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

📄 cast.m

📁 这是一个关于MATLAB的函数
💻 M
字号:
function resp = cast(rn,datatype,siz)
%CAST  Returns an object configured for a predefined target data type
%   O = CAST(MM,TYPE) - Defines the numeric representation to be
%   applied to the register object O.  The TYPE input defines 
%   some common data types.  This method coppies the properties of 
%   MM object to O and adjusts the properties of O to 
%   match the specified TYPE.  As a result, future READ/WRITE operations 
%   will apply the appropriate data conversion to implement the numeric 
%   representation. For uncommon datatypes, it is possible to 
%   directly modify the O properties, but generally it is better 
%   to use the CAST method.
% 
%   O = CAST(MM,TYPE,SIZE) - Does an additional reshaping - adjusts the 
%   'size' property - of the O object.
%
%   Note: SIZE is always 1 for register objects.
%
%  See also CONVERT, COPY.

%   Copyright 2002 The MathWorks, Inc.
%   $Revision: 1.9 $  $Date: 2002/05/13 18:31:53 $

error(nargchk(2,3,nargin));
if ~ishandle(rn),
    error('First Parameter must be a RNUMERIC Handle.');
end
if ~ischar(datatype),
     error('DATATYPE parameter must be a string.');
end

if nargin==2
    resp = cast_rnumeric(rn,datatype);
else
    resp = cast_rnumeric(rn,datatype,siz);
end

% [EOF] cast.m

⌨️ 快捷键说明

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