101 lines
3.0 KiB
Matlab
101 lines
3.0 KiB
Matlab
function hf = plot_LongPeriod(H_lst, Ma_cell, CGx_lst, rlst, surfix_lst)
|
|
|
|
|
|
ss_c = {'r', 'b', 'm'};
|
|
ss_m = {'-o', '-+', '-*', '-x', '-s', '-^', '-v', '-p'};
|
|
ss_m1 = {'o', '+', '*', 'x', 's', '^', 'v', 'p'};
|
|
|
|
% hf = shortPeriod_figure(2);
|
|
hf{1,1} = new_figure();
|
|
hf{1,2} = '³¤ÖÜÆÚģ̬ƵÂÊ';
|
|
hf{2,1} = new_figure();
|
|
hf{2,2} = '³¤ÖÜÆÚ×èÄá±È';
|
|
|
|
n_H = length(H_lst);
|
|
n_CGx = length(CGx_lst);
|
|
|
|
lg_postion = { [0.6 0.6 0.1980 0.120],...
|
|
[0.6 0.6 0.1980 0.120]};
|
|
|
|
for idx = 1:length(rlst)
|
|
H(idx,1) = rlst{idx}.H;
|
|
Ma(idx,1) = rlst{idx}.Ma;
|
|
CGx(idx,1) = rlst{idx}.CGx;
|
|
mode_np = rlst{idx}.mode_np;
|
|
wn(idx,1) = mode_np.wn;
|
|
zeta(idx,1) = mode_np.zeta;
|
|
t2(idx,1) = mode_np.t2;
|
|
end
|
|
|
|
for idx_cgx = 1:length (CGx_lst)
|
|
cgx = CGx_lst (idx_cgx);
|
|
for idx_H = 1:length(H_lst)
|
|
h = H_lst(idx_H);
|
|
Ma_lst = Ma_cell{idx_H};
|
|
j = 1;
|
|
Ma_rlst = [];
|
|
wn_rlst = [];
|
|
zeta_rlst = [];
|
|
for idx_Ma = 1:length(Ma_lst)
|
|
ma = Ma_lst(idx_Ma);
|
|
idx1 =(H==h)&(Ma==ma)&(CGx==cgx);
|
|
if sum(idx1)==0
|
|
continue;
|
|
end
|
|
Ma_rlst(j) = ma;
|
|
wn_rlst(j) = wn(idx1);
|
|
zeta_rlst(j) = zeta(idx1);
|
|
j = j+1;
|
|
end
|
|
|
|
ss = [ss_m{idx_H}, ss_c{idx_cgx}];
|
|
ss1 = [ss_m1{idx_H}, ss_c{idx_cgx}];
|
|
figure(hf{1});
|
|
plot(Ma_rlst, wn_rlst, ss);
|
|
hold on;
|
|
grid on;
|
|
xlabel('Ma');
|
|
ylabel('³¤ÖÜÆÚģ̬ƵÂÊ(rad/s)');
|
|
|
|
figure(hf{2});
|
|
plot(Ma_rlst, zeta_rlst, ss);
|
|
hold on;
|
|
grid on;
|
|
xlabel('Ma');
|
|
ylabel('³¤ÖÜÆÚģ̬×èÄá±È');
|
|
% ylim([0, 0.5]);
|
|
|
|
end
|
|
end
|
|
|
|
for idx = 1:2
|
|
figure(hf{idx});
|
|
lg = new_legend(hf{idx}, lg_postion{idx});
|
|
set(hf{idx}, 'CurrentAxes', lg);
|
|
hold on;
|
|
ds = 1/(n_H+n_CGx);
|
|
for idx_H = 1:n_H
|
|
am = plot(0.25, ds*(n_CGx+n_H-idx_H)+ds/2, ['k',ss_m{idx_H}]);
|
|
as = text(0.5, ds*(n_CGx+n_H-idx_H)+ds/2, ['H = ', num2str(H_lst(idx_H)/1000),' km']);
|
|
set(as, 'FontSize', 8);
|
|
set(am, 'MarkerSize', 6);
|
|
end
|
|
for idx_cgx = (n_H+1):(n_H+n_CGx)
|
|
plot([0.15 0.35], [ds*(n_CGx+n_H-idx_cgx)+ds/2 ds*(n_CGx+n_H-idx_cgx)+ds/2], ss_c{idx_cgx-n_H});
|
|
as = text(0.5, ds*(n_CGx+n_H-idx_cgx)+ds/2, surfix_lst{idx_cgx-n_H});
|
|
set(as,'FontSize',8);
|
|
end
|
|
|
|
hold off;
|
|
axis([0 1 0 1] );
|
|
%=======================================================
|
|
OLD_POS = get(lg,'position');
|
|
NEW_POS = [ OLD_POS(1:3) , 0.03*(n_CGx+n_H)];
|
|
set(lg,'position',NEW_POS);
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|