📄 multlchk.m
字号:
function [input,inpidx,table] = multlchk(input,inpidx,table)
%MULTLCHK checks input to MULTLINR for correctness.
% [INPUT,INPIDX,TABLE] = MULTLCHK(INPUT,INPIDX,TABLE)
% ensures that all of the arguments to MULTLINR are appropriate.
% Copyright (c) 1990-93 by The MathWorks, Inc.
% $Revision: 1.4 $ $Date: 1993/06/09 22:09:40 $
% Wes Wang 1/16/93
tmp = find(inpidx<=0);
if ~isempty(tmp)
error('All elements in INPIDX must be greater than zero');
end;
if sum(inpidx) ~= length(input)
error('The dimention of INPUT must be specified in INPIDX');
end;
tmp = 1;
for i = 1:length(inpidx)
tmp = tmp * inpidx(i);
end;
if tmp ~= length(table);
error('The dimention of TABLE does not match INPUT');
end;
tmp = 1; tend = inpidx(1);
for i=1:length(inpidx)
if any(diff(input(tmp:tmp+inpidx(i)-1)) <= 0)
error('Each index in INPUT must increase monotonically');
end;
tmp = tmp + inpidx(i);
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -