Index: trunk/src/series/time_series.m
===================================================================
--- trunk/src/series/time_series.m	(revision 960)
+++ trunk/src/series/time_series.m	(revision 970)
@@ -172,12 +172,12 @@
 ImageTypeOptions={'image','multimage','mmreader','video'};
 NcTypeOptions={'netcdf','civx','civdata'};
-FileType=cell(1,nbview);
-FileInfo=cell(1,nbview);
-MovieObject=cell(1,nbview);
-CheckImage=cell(1,nbview);
-CheckNc=cell(1,nbview);
-frame_index=cell(1,nbview);
-
-for iview=1:nbview
+FileType=cell(1,NbView);
+FileInfo=cell(1,NbView);
+MovieObject=cell(1,NbView);
+CheckImage=cell(1,NbView);
+CheckNc=cell(1,NbView);
+frame_index=cell(1,NbView);
+
+for iview=1:NbView
     if ~exist(filecell{iview,1}','file')
         disp_uvmat('ERROR',['the first input file ' filecell{iview,1} ' does not exist'],checkrun)
@@ -233,5 +233,5 @@
     return
 end
-if nbview==2 && ~isequal(CheckImage{1},CheckImage{2})
+if NbView==2 && ~isequal(CheckImage{1},CheckImage{2})
     disp_uvmat('ERROR','input must be two image series or two netcdf file series',checkrun)
     return
@@ -252,10 +252,10 @@
 %% Set field names and velocity types
 InputFields{1}=[];%default (case of images)
-if nbview==2
+if NbView==2
     InputFields{2}=[];%default (case of images)
 end
 if isfield(Param,'InputFields')
     InputFields{1}=Param.InputFields;
-    if nbview==2
+    if NbView==2
         InputFields{2}=Param.InputFields;%default
         if isfield(Param.InputFields,'FieldName_1')
@@ -311,15 +311,15 @@
 
 %%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%%
-for index=1:nbfield
-    update_waitbar(WaitbarHandle,index/nbfield)
+for index=1:NbField
+    update_waitbar(WaitbarHandle,index/NbField)
     if ~isempty(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue')
         disp('program stopped by user')
         break % leave the loop if stop is ordered
     end
-    Data=cell(1,nbview);%initiate the set Data;
+    Data=cell(1,NbView);%initiate the set Data;
     nbtime=0;
     dt=[];
     %%%%%%%%%%%%%%%% loop on views (input lines) %%%%%%%%%%%%%%%%
-    for iview=1:nbview
+    for iview=1:NbView
         % reading input file(s)
         [Data{iview},tild,errormsg] = read_field(filecell{iview,index},FileType{iview},InputFields{iview},frame_index{iview}(index));
@@ -407,5 +407,5 @@
                     testsum(ivar)=1;
                     DataOut.(VarName)=Field.(VarName);
-                    DataOut.([VarName 'Histo'])=zeros([nbfield numel(DataOut.(VarName))]);
+                    DataOut.([VarName 'Histo'])=zeros([NbField numel(DataOut.(VarName))]);
                     VarMesh=Field.(VarName)(2)-Field.(VarName)(1);
                 end
@@ -444,5 +444,5 @@
                     VarName=Field.ListVarName{ivar};
                     siz=size(Field.(VarName));
-                    DataOut.(VarName)=zeros([nbfield siz]);
+                    DataOut.(VarName)=zeros([NbField siz]);
                 end
             end
@@ -466,9 +466,9 @@
                 if MaxIndex_new>MaxIndex% the variable max for the current field exceeds the previous one
                     DataOut.(VarName)=[DataOut.(VarName) VarMesh*(MaxIndex+1:MaxIndex_new)];% append the new variable values
-                    DataOut.([VarName 'Histo'])=[DataOut.([VarName 'Histo']) zeros(nbfield,MaxIndex_new-MaxIndex)]; % append the new histo values
+                    DataOut.([VarName 'Histo'])=[DataOut.([VarName 'Histo']) zeros(NbField,MaxIndex_new-MaxIndex)]; % append the new histo values
                 end
                 if MinIndex_new <= MinIndex-1
                     DataOut.(VarName)=[VarMesh*(MinIndex_new:MinIndex-1) DataOut.(VarName)];% insert the new variable values
-                    DataOut.([VarName 'Histo'])=[zeros(nbfield,MinIndex-MinIndex_new) DataOut.([VarName 'Histo'])];% insert the new histo values
+                    DataOut.([VarName 'Histo'])=[zeros(NbField,MinIndex-MinIndex_new) DataOut.([VarName 'Histo'])];% insert the new histo values
                     ind_start=1;
                 else
@@ -560,5 +560,5 @@
 test_time=diff(DataOut.Time)>0;% test that the readed time is increasing (not constant)
 if ~test_time
-    DataOut.Time=1:nbfield;
+    DataOut.Time=1:NbField;
 end
 
