function out=loadADCP(t,adcpdir,flg) % ADCP=loadADCP(TIME,ADCPDIR) loads the data in the directory ADCPDIR % between times TIME(1) and TIME(2) into memory, and returns that data to % ADCP. If there is no adcp data for that period, the empty matrix is % returned. % % if TIME='all', all adcp data in ADCPDIR is loaded. if nargin<3 flg=0; end % Load the data. try mload([adcpdir '/adcpInfo.mat']) catch mload([adcpdir '/adcp_info.mat']) end if isstr(t) && strcmp(t,'all') t=[-inf inf]; end inds=find(t(1)M2 data2 =[data2;NaN*ones(M1-M2,N2)]; elseif M2>M1 data1 =[data1;NaN*ones(M2-M1,N1)]; end; dat = setfield(dat,names{i},[data1 data2]); else dat = setfield(dat,names{i},[data1; data2]); end; else if size(data2,2)==dim2 if direction==2 dat = setfield(dat,names{i},[data1 data2]); else dat = setfield(dat,names{i},[data1; data2]); end; end; end; end;