-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdisplayRiser4DTtoolboxPaper.m
119 lines (83 loc) · 3.28 KB
/
displayRiser4DTtoolboxPaper.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
% this is the code to produce plots for DT toolbox paper
% 26/10/2021 @ Franklin Court, Cambridge [J Yang]
isExportFig = 0;
caseFolder = 'B';
figPath = 'Papers\DT sensitivity toolbox\figs';
varName = {'C_a', 'C_d', '\rho', 'E', '\rho_o', 'T_0','\alpha','\delta'};
% (1)
% plot Fisher eigenvalues
fig1= figure;
bar([1:nPar*2].',lambda)
xlabel('Index of FIM EigValue')
set(gca,'FontSize',14)
xlim ([0.5 16.5])
figName ='FisherEigValues';
figuresize(24, 12, 'centimeters');
movegui(fig1, [50 40])
set(gcf, 'Color', 'w');
exportFig(isExportFig,strcat(figPath,'\',caseFolder),figName);
% (2)
% plot eigenvectors
fig1 = figure;
for ii = 1:6
subplot(2,3,ii)
b=bar([1:nPar*2]',V_e(:,ii));
set(gca,'FontSize',14)
set(gca,'xtick',[round(nPar/2) nPar+round(nPar/2)],'xticklabel',[{'Mean'},{'Std Dev'}]);
xtips = b.XData;
ytips = b.YData;
ytips = ytips.*double(ytips>0);
labels = [varName varName];
text(xtips,ytips,labels,'HorizontalAlignment','center',...
'VerticalAlignment','bottom')
ylim ([-1 1])
title(['No.', num2str(ii) ,' FIM EigVector ','[\lambda_',num2str(ii),'=',num2str(round(lambda(ii)),'% 1.1e'),']'])
end
figName ='FisherEigvectors';
figuresize(36, 18, 'centimeters');
movegui(fig1, [50 40])
set(gcf, 'Color', 'w');
exportFig(isExportFig,strcat(figPath,'\',caseFolder),figName);
% (3)
% plot Pf sensitivity
[~,indexYear] = min(abs(Opts.yearsLifeExp - fatigueLife ));
pF1 = round(pF_Fatigue.pFm(1,indexYear,iState)*1e2)/1e2;
% disp failure sensitivities
titleStr = [{['Sensitivity-FatigueFailure ','[Pf = ',num2str(pF1),']']}];
fig1 = figure;
subplot(211)
b = bar([1:nPar*2],rFatigue);
ttl = title(titleStr);
ttl.Units = 'Normalize';
ttl.Position(1) = 0; % use negative values (ie, -0.1) to move further left
ttl.HorizontalAlignment = 'left';
set(gca,'xtick',[round(nPar/2) nPar+round(nPar/2)],'xticklabel',[{'Mean'},{'Std Dev'}]);
xtips = b.XData;
ytips = b.YData;
ytips = ytips.*double(ytips>0);
labels = [varName varName];
text(xtips,ytips,labels,'HorizontalAlignment','center',...
'VerticalAlignment','bottom')
ylim([min(b.YData)-2 max(b.YData)+5])
ylabel('r [-]')
set(gca,'FontSize',14)
% (4)
subplot(212)
% projection to fisher eigenvectors, resutls from fisher calculation
titleStr = [{' Projection onto FIM EigVector '}];
V_fisher = V_e;
rc = rFatigue;
s = rc.' * V_fisher / norm(rc);%
bar ([1:nPar*2] , abs(s));
ttl = title(titleStr);
ttl.Units = 'Normalize';
ttl.Position(1) = 0; % use negative values (ie, -0.1) to move further left
ttl.HorizontalAlignment = 'left';
ylim ([0 1])
xlim ([0.5 16.5])
set(gca,'FontSize',14)
figName ='PfFatigue';
figuresize(24, 18, 'centimeters');
movegui(fig1, [50 40])
set(gcf, 'Color', 'w');
exportFig(isExportFig,strcat(figPath,'\',caseFolder),figName);