⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cast_rnumeric.m

📁 这是一个关于MATLAB的函数
💻 M
字号:
function resp = cast_rnumeric(rn,datatype,siz)
% Private. Cast to another object with different datatype.
% Copyright 2002 The MathWorks, Inc.
%   $Revision: 1.6 $  $Date: 2002/05/30 15:34:53 $

if ~ishandle(rn),
    error('First Parameter must be an RNUMERIC 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.');
    else
        if any(siz<=0)
            error(['Invalid size : [' num2str(siz) '], negative indices are not allowed ']);
        elseif prod(siz)>1
            error('Register variables cannot have size>1 ');
        end
    end    
end

% Copy constructor
mm = copy(rn);

% 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_rnumeric.m

⌨️ 快捷键说明

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