Changeset 970 for trunk/src/series/time_series.m
 Timestamp:
 Nov 9, 2016, 7:12:32 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/series/time_series.m
r960 r970 172 172 ImageTypeOptions={'image','multimage','mmreader','video'}; 173 173 NcTypeOptions={'netcdf','civx','civdata'}; 174 FileType=cell(1, nbview);175 FileInfo=cell(1, nbview);176 MovieObject=cell(1, nbview);177 CheckImage=cell(1, nbview);178 CheckNc=cell(1, nbview);179 frame_index=cell(1, nbview);180 181 for iview=1: nbview174 FileType=cell(1,NbView); 175 FileInfo=cell(1,NbView); 176 MovieObject=cell(1,NbView); 177 CheckImage=cell(1,NbView); 178 CheckNc=cell(1,NbView); 179 frame_index=cell(1,NbView); 180 181 for iview=1:NbView 182 182 if ~exist(filecell{iview,1}','file') 183 183 disp_uvmat('ERROR',['the first input file ' filecell{iview,1} ' does not exist'],checkrun) … … 233 233 return 234 234 end 235 if nbview==2 && ~isequal(CheckImage{1},CheckImage{2})235 if NbView==2 && ~isequal(CheckImage{1},CheckImage{2}) 236 236 disp_uvmat('ERROR','input must be two image series or two netcdf file series',checkrun) 237 237 return … … 252 252 %% Set field names and velocity types 253 253 InputFields{1}=[];%default (case of images) 254 if nbview==2254 if NbView==2 255 255 InputFields{2}=[];%default (case of images) 256 256 end 257 257 if isfield(Param,'InputFields') 258 258 InputFields{1}=Param.InputFields; 259 if nbview==2259 if NbView==2 260 260 InputFields{2}=Param.InputFields;%default 261 261 if isfield(Param.InputFields,'FieldName_1') … … 311 311 312 312 %%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%% 313 for index=1: nbfield314 update_waitbar(WaitbarHandle,index/ nbfield)313 for index=1:NbField 314 update_waitbar(WaitbarHandle,index/NbField) 315 315 if ~isempty(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue') 316 316 disp('program stopped by user') 317 317 break % leave the loop if stop is ordered 318 318 end 319 Data=cell(1, nbview);%initiate the set Data;319 Data=cell(1,NbView);%initiate the set Data; 320 320 nbtime=0; 321 321 dt=[]; 322 322 %%%%%%%%%%%%%%%% loop on views (input lines) %%%%%%%%%%%%%%%% 323 for iview=1: nbview323 for iview=1:NbView 324 324 % reading input file(s) 325 325 [Data{iview},tild,errormsg] = read_field(filecell{iview,index},FileType{iview},InputFields{iview},frame_index{iview}(index)); … … 407 407 testsum(ivar)=1; 408 408 DataOut.(VarName)=Field.(VarName); 409 DataOut.([VarName 'Histo'])=zeros([ nbfield numel(DataOut.(VarName))]);409 DataOut.([VarName 'Histo'])=zeros([NbField numel(DataOut.(VarName))]); 410 410 VarMesh=Field.(VarName)(2)Field.(VarName)(1); 411 411 end … … 444 444 VarName=Field.ListVarName{ivar}; 445 445 siz=size(Field.(VarName)); 446 DataOut.(VarName)=zeros([ nbfield siz]);446 DataOut.(VarName)=zeros([NbField siz]); 447 447 end 448 448 end … … 466 466 if MaxIndex_new>MaxIndex% the variable max for the current field exceeds the previous one 467 467 DataOut.(VarName)=[DataOut.(VarName) VarMesh*(MaxIndex+1:MaxIndex_new)];% append the new variable values 468 DataOut.([VarName 'Histo'])=[DataOut.([VarName 'Histo']) zeros( nbfield,MaxIndex_newMaxIndex)]; % append the new histo values468 DataOut.([VarName 'Histo'])=[DataOut.([VarName 'Histo']) zeros(NbField,MaxIndex_newMaxIndex)]; % append the new histo values 469 469 end 470 470 if MinIndex_new <= MinIndex1 471 471 DataOut.(VarName)=[VarMesh*(MinIndex_new:MinIndex1) DataOut.(VarName)];% insert the new variable values 472 DataOut.([VarName 'Histo'])=[zeros( nbfield,MinIndexMinIndex_new) DataOut.([VarName 'Histo'])];% insert the new histo values472 DataOut.([VarName 'Histo'])=[zeros(NbField,MinIndexMinIndex_new) DataOut.([VarName 'Histo'])];% insert the new histo values 473 473 ind_start=1; 474 474 else … … 560 560 test_time=diff(DataOut.Time)>0;% test that the readed time is increasing (not constant) 561 561 if ~test_time 562 DataOut.Time=1: nbfield;562 DataOut.Time=1:NbField; 563 563 end 564 564
Note: See TracChangeset
for help on using the changeset viewer.