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

📄 checkerforsize.m

📁 这是一个关于MATLAB的函数
💻 M
字号:
function sv = checkerforsize(nn,usersSV)
%CHECKERFORsize - private function to verify operations on property STORAGEUNITSPERVALUE

%   Copyright 2002 The MathWorks, Inc.
%   $Revision: 1.2 $  $Date: 2002/05/29 20:06:40 $

if ~isnumeric(usersSV),
    error('size property must be a numeric vector.');
end
totalSize = prod(usersSV);
if any(usersSV<=0)
    error('SIZE limited to positive integer values > 0');
elseif size(totalSize) ~= [1 1],
    error('SIZE limited to 1-D vectors');
end
arrSize = size(usersSV);

if arrSize(1) ~= 1,
    sv = round(usersSV');  % Convert to a row vector 
else
    sv = round(usersSV);
end
% recompute some other property values
nn.numberofstorageunits=nn.storageunitspervalue*prod(sv);

% [EOF] checkerforsize.m

⌨️ 快捷键说明

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