Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bengida1989 committed Dec 4, 2020
1 parent 4e8a7c4 commit ae2a268
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions vorticity_threshold.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,17 @@
vort = reshape(tmp, nRows, nColumns);

elseif MASK(1) == 1 && threshold>0 % Regular masking
S = swirl;
for i=1:nRows
for j=1:nColumns
if abs(S(i,j))<=threshold*max(abs(S(:)))
vorticity(i,j)=0;
end;
end;
end;
P = swirl;
P_max = max(max(abs(P)));
P_thres = threshold*P_max;
vorticity(abs(P)<=P_thres) = 0;
vort = vorticity;

else
vort = vorticity;
end;

end


case 'Vorticity'
if MASK(1) == 0 && threshold>0% Gaussian masking
Expand All @@ -48,16 +47,15 @@
vort = reshape(tmp, nRows, nColumns);

elseif MASK(1) == 1 && threshold>0% Regular masking
V = vorticity;
for i=1:nRows
for j=1:nColumns
if abs(V(i,j))<=threshold*max(abs(V(:)))
vorticity(i,j)=0;
end;
end;
end;
P = vorticity;
P_max = max(max(abs(P)));
P_thres = threshold*P_max;
vorticity(abs(P)<=P_thres) = 0;
vort = vorticity;

else
vort = vorticity;
end;
end;

end

end

0 comments on commit ae2a268

Please sign in to comment.