checkerforsuperval.m

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

M
29 行
字号
function sv = checkerforsuperval(nn,usersSV)
%CHECKERFORSUPERVAL - private function to verify operations on property STORAGEUNITSPERVALUE
% Copyright 2002 The MathWorks, Inc.
%   $Revision: 1.2 $  $Date: 2002/03/26 20:38:33 $

if strcmp(nn.procsubfamily(1:2),'C6')
    totalBytes = round((usersSV  * nn.bitsperstorageunit)/8);
    if totalBytes > 8,
        error('''C6x memory bit sizes are limited to increments of 8 (8,16,24,...)');
        return;
    end
elseif strcmp(nn.procsubfamily,'C54x') 
    totalBytes = round((usersSV  * nn.bitsperstorageunit)/16);    
    if totalBytes > 2,
        error('''C54x memory bit sizes are limited to increments of 16 (16,32,...)');
        return;
    end
end

if totalBytes < 1,
    error('Numeric bit sizes are limited to byte increments (8,16,24,etc)');
    return;
end

sv = round(usersSV);
nn.wordsize = (sv  * nn.bitsperstorageunit);
nn.numberofstorageunits = sv*prod(nn.size);

⌨️ 快捷键说明

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