Changeset 761 for trunk/src/series/turb_stat.m
 Timestamp:
 May 1, 2014, 8:28:05 AM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/series/turb_stat.m
r751 r761 184 184 U2Mean_1=0; 185 185 V2Mean_1=0; 186 checkgrid=0;% test for a structured grid for input field 186 Counter_1=0; 187 187 188 %%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%% 188 189 for index=1:NbField … … 201 202 Uprev=Field.U; 202 203 Vprev=Field.V; 203 end 204 FF=isnan(Field.U)Field.U<60Field.U>30;% threshold on U 204 FFprev=Field.FF; 205 end 206 FF=isnan(Field.U);%Field.U<60Field.U>30;% threshold on U 205 207 DataOut.Counter=DataOut.Counter+ (~FF);% add 1 to the couter for non NaN point 208 Counter_1=Counter_1+(~FF & ~FFprev); 206 209 Field.U(FF)=0;% set to 0 the nan values 207 210 Field.V(FF)=0; … … 215 218 Uprev=Field.U; %store for next iteration 216 219 Vprev=Field.V; 220 FFprev=FF; 217 221 end 218 222 %%%%%%%%%%%%%%%% end loop on field indices %%%%%%%%%%%%%%%% … … 224 228 V2Mean=V2Mean./DataOut.Counter; % normalize the mean 225 229 UVMean=UVMean./DataOut.Counter; % normalize the mean 226 U2Mean_1=U2Mean_1./ DataOut.Counter; % normalize the mean227 V2Mean_1=V2Mean_1./ DataOut.Counter; % normalize the mean230 U2Mean_1=U2Mean_1./Counter_1; % normalize the mean 231 V2Mean_1=V2Mean_1./Counter_1; % normalize the mean 228 232 DataOut.u2Mean=U2MeanDataOut.UMean.*DataOut.UMean; % normalize the mean 229 233 DataOut.v2Mean=V2MeanDataOut.VMean.*DataOut.VMean; % normalize the mean
Note: See TracChangeset
for help on using the changeset viewer.