checkerforsuperval.m

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

M
26 行
字号
function sv = checkerforsuperval(mm,usersSV)
%CHECKERFORSUPERVAL - private function to verify operations on property STORAGEUNITSPERVAL
%   Copyright 2002 The MathWorks, Inc.
%   $Revision: 1.4 $ $Date: 2002/03/15 15:36:37 $

if strcmp(mm.procsubfamily(1:2),'C6')
    totalBytes = round((usersSV  * mm.bitsperstorageunit)/8);    
    if totalBytes > 8,
        error('''C6x Numeric values are limited to a maximum of 64 bits (8 bytes)');
        return;
    end
elseif strcmp(mm.procsubfamily,'C54x') & totalBytes > 2,
    totalBytes = round((usersSV  * mm.bitsperstorageunit)/16);    
    if totalBytes > 2,
        error('''C54x Numeric values are limited to a maximum of 32 bits (2 bytes)');
        return;
    end
end

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

sv = round(usersSV);
mm.wordsize = (sv  * mm.bitsperstorageunit) - mm.postpad - mm.prepad;

⌨️ 快捷键说明

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