S = size(stop); %计算停止条件,包含3个值的列向量
if ((S(1) > 1) & (S(2) > 1)) | (S(1) > 3) | (S(2) > 3) | (length(S) > 2)
error('stop must have only one row or one column of max three elements')
end
if S(1) > 1 %第一行个数>1,则变为列向量
stop = stop';
S = size(stop);
end
if S(2) < 3 %列数为1,2
stop(3)=defstop(3);
end
if S(2) < 2 %列数为1
stop(2)=defstop(2);
end