Repository navigation
Expand file tree
/
Copy pathplotinit.m
More file actions
40 lines (33 loc) · 1.44 KB
/
Copy pathplotinit.m
File metadata and controls
40 lines (33 loc) · 1.44 KB
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
38
39
40
function h = plotinit(xg, visible)
if nargin<1
xg=[];
elseif ~isempty(xg)
validateattributes(xg, {'struct'}, {'scalar'}, mfilename, 'grid',1)
end
if nargin<2
visible='on';
else
validateattributes(visible, {'char'}, {'vector'}, mfilename, 'figure visibility: on/off', 2)
end
%Csp = ceil(sqrt(Nt));
%Rsp = ceil(Nt/Csp);
if(xg.lx(3)==1 || xg.lx(2)==1) %2D simulation
figpos=[0.1 0.1 0.3 0.3];
else %3D simulation
figpos=[0.1 0.1 0.8 0.3];
end
h.f1=figure('name','V1', 'units', 'normalized', 'position', figpos, 'visible', visible);
h.f2=figure('name','Ti', 'units', 'normalized', 'position', figpos, 'visible', visible);
h.f3=figure('name','Te', 'units', 'normalized', 'position', figpos, 'visible', visible);
h.f4=figure('name','J1', 'units', 'normalized', 'position', figpos, 'visible', visible);
h.f5=figure('name','V2', 'units', 'normalized', 'position', figpos, 'visible', visible);
h.f6=figure('name','V3', 'units', 'normalized', 'position', figpos, 'visible', visible);
h.f7=figure('name','J2', 'units', 'normalized', 'position', figpos, 'visible', visible);
h.f8=figure('name','J3', 'units', 'normalized', 'position', figpos, 'visible', visible);
if ~isempty(xg) && xg.lx(2)>1 && xg.lx(3)>1 % a 3-D simulation
h.f9=figure('name','phiTop', 'units', 'normalized', 'position', figpos, 'visible', visible);
else
h.f9 = [];
end
h.f10=figure('name','Ne', 'units', 'normalized', 'position', figpos, 'visible', visible);
end