Index: trunk/src/series/civ_series.m
===================================================================
--- trunk/src/series/civ_series.m	(revision 1114)
+++ trunk/src/series/civ_series.m	(revision 1115)
@@ -628,5 +628,9 @@
             ind_good=1:numel(Data.Civ1_X);
         end
-        
+        if isempty(ind_good)
+                        disp_uvmat('ERROR','all vectors of civ1 are bad, check input parameters' ,checkrun)
+                        return
+        end
+
         % perform Patch calculation using the UVMAT fct 'filter_tps'
         [Data.Civ1_SubRange,Data.Civ1_NbCentres,Data.Civ1_Coord_tps,Data.Civ1_U_tps,Data.Civ1_V_tps,tild,Ures, Vres,tild,FFres]=...
@@ -919,4 +923,8 @@
         else
             ind_good=1:numel(Data.Civ2_X);
+        end
+                if isempty(ind_good)
+                        disp_uvmat('ERROR','all vectors of civ2 are bad, check input parameters' ,checkrun)
+                        return
         end
         [Data.Civ2_SubRange,Data.Civ2_NbCentres,Data.Civ2_Coord_tps,Data.Civ2_U_tps,Data.Civ2_V_tps,tild,Ures,Vres,tild,FFres]=...
Index: trunk/src/series/merge_proj.m
===================================================================
--- trunk/src/series/merge_proj.m	(revision 1114)
+++ trunk/src/series/merge_proj.m	(revision 1115)
@@ -86,5 +86,7 @@
     return
 end
-
+if 0==1
+    phys; % used to include phys when compiling is done
+end
 %%%%%%%%%%%% STANDARD PART (DO NOT EDIT) %%%%%%%%%%%%
 ParamOut=[]; %default output
Index: trunk/src/series/turb_stat.m
===================================================================
--- trunk/src/series/turb_stat.m	(revision 1114)
+++ trunk/src/series/turb_stat.m	(revision 1115)
@@ -204,5 +204,5 @@
 % for i_slice=1:Param.IndexRange.NbSlice
 %     i_slice
-    ind_first=Param.IndexRange.first_i
+    ind_first=Param.IndexRange.first_i;
     for index_i=ind_first:Param.IndexRange.NbSlice:Param.IndexRange.last_i
         if ~isempty(RUNHandle)&& ~strcmp(get(RUNHandle,'BusyAction'),'queue')
@@ -210,5 +210,5 @@
             break
         end
-        for index_j=Param.IndexRange.first_j:Param.IndexRange.last_j
+        for index_j=first_j:last_j
             InputFile=fullfile_uvmat(RootPath{1},SubDir{1},RootFile{1},FileExt{1},NomType{1},index_i,index_i,index_j,index_j);
             [Field,tild,errormsg] = read_field(InputFile,FileType{iview},InputFields{iview});
@@ -217,5 +217,5 @@
             
             %%%%%%%%%%%% MAIN RUNNING OPERATIONS  %%%%%%%%%%%%
-            if index_i==ind_first && index_j==Param.IndexRange.first_j %initiate the output data structure in the first field
+            if index_i==ind_first && index_j==first_j %initiate the output data structure in the first field
                 [CellInfo,NbDim,errormsg]=find_field_cells(Field);
                 YName='coord_y';%default
