File tree Expand file tree Collapse file tree 1 file changed +17
-19
lines changed
Expand file tree Collapse file tree 1 file changed +17
-19
lines changed Original file line number Diff line number Diff line change 1919 vort = reshape(tmp , nRows , nColumns );
2020
2121 elseif MASK(1 ) == 1 && threshold > 0 % Regular masking
22- S = swirl ;
23- for i= 1 : nRows
24- for j= 1 : nColumns
25- if abs(S(i ,j ))<=threshold * max(abs(S(: )))
26- vorticity(i ,j )=0 ;
27- end ;
28- end ;
29- end ;
22+ P = swirl ;
23+ P_max = max(max(abs(P )));
24+ P_thres = threshold * P_max ;
25+ vorticity(abs(P )<=P_thres ) = 0 ;
3026 vort = vorticity ;
27+
3128 else
3229 vort = vorticity ;
33- end ;
30+
31+ end
32+
3433
3534 case ' Vorticity'
3635 if MASK(1 ) == 0 && threshold > 0% Gaussian masking
4847 vort = reshape(tmp , nRows , nColumns );
4948
5049 elseif MASK(1 ) == 1 && threshold > 0% Regular masking
51- V = vorticity ;
52- for i= 1 : nRows
53- for j= 1 : nColumns
54- if abs(V(i ,j ))<=threshold * max(abs(V(: )))
55- vorticity(i ,j )=0 ;
56- end ;
57- end ;
58- end ;
50+ P = vorticity ;
51+ P_max = max(max(abs(P )));
52+ P_thres = threshold * P_max ;
53+ vorticity(abs(P )<=P_thres ) = 0 ;
5954 vort = vorticity ;
55+
6056 else
6157 vort = vorticity ;
62- end ;
63- end ;
58+
59+ end
60+
61+ end
You can’t perform that action at this time.
0 commit comments