reshape.m

来自「这是一个关于MATLAB的函数」· M 代码 · 共 29 行

M
29 行
字号
function mm = reshape(mm,size)
% RESHAPE(MM,SIZE) Changes the dimension or/and dimension size of MM.
% 
% RESHAPE(MM,[]) does not change the existing SIZE property of MM.
% 
% Example: If 'x' is an embedded symbol,
%          mm = symobj(cc,'x')
%          and if 'mm.read' gives [4 5]
%          reshape(mm,[2 2]) will give
%          [4 5; 2 3]
% 
%   Copyright 2002 The MathWorks, Inc.

%   $Revision: 1.2 $  $Date: 2002/03/29 13:35:18 $

error(nargchk(2,2,nargin));
if ~ishandle(mm),
    error('First Parameter must be a NUMERIC Handle.');
end
if ~isnumeric(size),
    error('SIZE must be a numeric.');
end

if ~isempty(size),
    mm.size = size;
    % else, use existing size info
end

% [EOF] reshape.m

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?