-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCG_Excursion_Figure_Code.m
125 lines (101 loc) · 3.63 KB
/
CG_Excursion_Figure_Code.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
120
121
122
123
124
function createfigure(X1, YMatrix1, X2, Y1, X3, Y2)
%CREATEFIGURE(X1, YMATRIX1, X2, Y1, X3, Y2)
% X1: vector of x data
% YMATRIX1: matrix of y data
% X2: vector of x data
% Y1: vector of y data
% X3: vector of x data
% Y2: vector of y data
% Auto-generated by MATLAB on 06-May-2017 11:27:32
% Create figure
figure1 = figure;
% Create axes
axes1 = axes('Parent',figure1);
%% Uncomment the following line to preserve the X-limits of the axes
% xlim(axes1,[85.4754494457395 95.6355918965357]);
%% Uncomment the following line to preserve the Y-limits of the axes
% ylim(axes1,[35000 101000]);
hold(axes1,'on');
% Create multiple lines using matrix input to plot
plot1 = plot(X1,YMatrix1);
set(plot1(1),'Color',[0 0 1]);
set(plot1(2),'MarkerFaceColor',[0.5 0.5 0.5],'MarkerEdgeColor',[0 0 1],...
'MarkerSize',5,...
'Marker','square',...
'LineStyle','none');
% Create plot
plot(X2,Y1,'LineStyle','--','Color',[0 0 0]);
% Create text
text('Parent',axes1,'String','MTOW',...
'Position',[87.0385185110479 88930.2906 0]);
% Create plot
plot(X3,Y2,'LineStyle','--','Color',[0 0 0]);
% Create text
text('Parent',axes1,'String','W_{Empty}',...
'Position',[86.2759471129749 46881.8402115992 0]);
% Create xlabel
xlabel('XCG Location (F.S.), ft');
% Create ylabel
ylabel('Weight (lbs)');
% Create title
title('CG Excursion Diagram');
% Create textbox
annotation(figure1,'textbox',...
[0.365285714285712 0.240476190476191 0.190071428571431 0.0619047619047659],...
'String',{'PAX + Baggage'},...
'LineStyle','none',...
'FitBoxToText','off');
% Create textarrow
annotation(figure1,'textarrow',[0.664285714285714 0.582142857142857],...
[0.373809523809524 0.228571428571429]);
% Create arrow
annotation(figure1,'arrow',[0.855357142857142 0.855357142857142],...
[0.399000000000001 0.114285714285716],'Color',[1 0 0],'HeadStyle','plain');
% Create textbox
annotation(figure1,'textbox',...
[0.784928571428563 0.354761904761906 0.0740000000000082 0.0952380952381152],...
'String',{'Main','LG'},...
'LineStyle','none',...
'FitBoxToText','off');
% Create textbox
annotation(figure1,'textbox',...
[0.631204517704513 0.376848625629116 0.0829285714285756 0.0523809523809622],...
'String','Crew',...
'LineStyle','none',...
'FitBoxToText','off');
% Create textbox
annotation(figure1,'textbox',...
[0.255136141636138 0.143631436314363 0.114094627594631 0.0633759194734925],...
'String','Fwd CG',...
'LineStyle','none',...
'FitBoxToText','off');
% Create textbox
annotation(figure1,'textbox',...
[0.600435286935283 0.140921409214092 0.107257020757024 0.0633759194734924],...
'String','Aft CG',...
'LineStyle','none',...
'FitBoxToText','off');
% Create line
annotation(figure1,'line',[0.598290598290598 0.598290598290598],...
[0.214092140921409 0.124661246612466],'LineWidth',1,'LineStyle','--');
% Create line
annotation(figure1,'line',[0.357264957264957 0.357264957264957],...
[0.235772357723577 0.124661246612466],'LineWidth',1,'LineStyle','--');
% Create textbox
annotation(figure1,'textbox',...
[0.324214285714282 0.478571428571429 0.0686428571428603 0.0523809523809623],...
'String',{'Fuel'},...
'LineStyle','none',...
'FitBoxToText','off');
% Create textbox
annotation(figure1,'textbox',...
[0.551381562881559 0.456078203639181 0.0686428571428603 0.0523809523809622],...
'String',{'Fuel'},...
'LineStyle','none',...
'FitBoxToText','off');
% Create textbox
annotation(figure1,'textbox',...
[0.450847374847372 0.753697251258227 0.11864285714286 0.0976190476190574],...
'String',{'PAX +','Baggage'},...
'LineStyle','none',...
'FitBoxToText','off');