-
Notifications
You must be signed in to change notification settings - Fork 0
/
getstrat2plot2.m
37 lines (33 loc) · 2.33 KB
/
getstrat2plot2.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function [si,zi,Ai]=getstrat2plot(zb,flyrU,flyrb,flyr,nlyr,dlyr,plyr,Y,N,M,Mi,Yb,dx,transx_y);
% if transx_y==1
% Q=squeeze(isfinite(flyr(:,Mi,:)));Q=cumsum(Q,2);
% zi=[zb(:,Mi) zb(:,Mi)+Yb(:,Mi) zb(:,Mi)*ones(1,nlyr)+Yb(:,Mi)*ones(1,nlyr)+Q*dlyr zb(:,Mi)+Yb(:,Mi)+plyr(:,Mi)*dlyr+Y(:,Mi)];%*ones(1,5);zi(:,2:3)=zi(:,2:3)+2.5;
% si=(ones(nlyr+3,1)*[0:N-1]*dx)';
% Ai=[flyrb(:,Mi) squeeze(flyr(:,Mi,:)) flyrU(:,Mi) flyrU(:,Mi)*0];
%
% elseif transx_y==2;
% Q=squeeze(isfinite(flyr(Mi,:,:)));Q=cumsum(Q,2);
% zi=[0*Yb(Mi,:)' Yb(Mi,:)' Yb(Mi,:)'*ones(1,nlyr)+Q*dlyr Yb(Mi,:)'+plyr(Mi,:)'*dlyr+Y(Mi,:)'];%*ones(1,5);zi(:,2:3)=zi(:,2:3)+2.5;
% si=(ones(nlyr+3,1)*[0:M-1]*dx)';
% Ai=[flyrb(Mi,:)' squeeze(flyr(Mi,:,:)) flyrU(Mi,:)' flyrU(Mi,:)'*0];
%
% end
%Y(:,Mi)
%pause
%with the white on top
if transx_y==1
Q=squeeze(isfinite(flyr(:,Mi,:)));Q=cumsum(Q,2);
%zi=[zb(:,Mi) zb(:,Mi)+Yb(:,Mi) zb(:,Mi)*ones(1,nlyr)+Yb(:,Mi)*ones(1,nlyr)+Q*dlyr zb(:,Mi)+Yb(:,Mi)+plyr(:,Mi)*dlyr+Y(:,Mi) zb(:,Mi)+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