www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@sweepset/range.m
function r = range(S) %RANGE Range of data in sweepset % % RANGE(SS) returns the range of the values within each sweep for each % variable in the sweepset. A (NUMSWEEPS-by-NUMVARS) matrix is returned. % Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc. % Range breaks if size(S,1) retuns two identical values at the end st=[tstart(S) size(S,1)+1]; r= zeros(length(st)-1,size(S,2)); for i=1:length(st)-1 r(i,:)= max(S.data(st(i):st(i+1)-1,:),[],1) - min(S.data(st(i):st(i+1)-1,:),[],1); end