📄 cast_numeric.m
字号:
function resp = cast_numeric(nn,datatype,siz)
% Private. Cast to another object with different datatype.
% Copyright 2002 The MathWorks, Inc.
% $Revision: 1.6 $ $Date: 2002/05/30 15:34:54 $
if ~ishandle(nn),
error('First Parameter must be an NUMERIC handle.');
end
if ~ischar(datatype),
error('Second Parameter must be a string.');
end
if nargin==3
if ~isnumeric(siz),
error('Third Parameter must be numeric.');
end
if any(siz<=0)
error(['Invalid size : [' num2str(siz) '], negative indices are not allowed ']);
end
end
% Copy constructor
mm = copy(nn);
% Convert datatype
if strcmp(mm.procsubfamily(1:2),'C6'), % C6x
cast_C6xx(mm,datatype);
elseif strcmp(mm.procsubfamily,'C54x'), % C5x
cast_C54x(mm,datatype);
else
error('Processor not supported');
end
% Reshape dimension of MM
if nargin==3
reshape(mm,siz);
end
% Return MM
resp = mm;
% [EOF] cast.m
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -