% To load into Matlab:  just type the name of this file, without the .m
% extension.

clf;

tmin  = 20;
tmax  = 31;

Amin  = 0;
Amax  = 100;

nfine = 512;
ttick = 1.0;
Atick = 20.0;

t1min = tmin;
t1max = 26;
t2min = t1max;
t2max = tmax;

%% ----------------------------------------------------------------
t1=[t1min:(t1max-t1min)/nfine:t1max];
a1 = 1.25;
b1 = -67.5;
c1 = 950;
A1 = a1*t1.^2 + b1*t1 + c1;
plot(t1,A1);
hold on;

%% ----------------------------------------------------------------
t2=[t2min:(t2max-t2min)/nfine:t2max];
a2 = -1.85;
b2 =  93.7;
c2 = -1145.5;
A2 = a2*t2.^2 + b2*t2 + c2;
plot(t2,A2);
hold on;

%% ----------------------------------------------------------------
axis([tmin tmax Amin Amax]);
h1=line([tmin tmax], [0 0]);
set(h1, 'LineStyle', '--');
h2=line([0 0], [Amin Amax]);
set(h2, 'LineStyle', '--');
xlabel('t');
ylabel('A');

set(gca, 'XTick', [xmin:xtick:xmax])
set(gca, 'YTick', [Amin:Atick:Amax])

set(gca, 'XGrid', 'on')
set(gca, 'YGrid', 'on')
set(gca, 'XMinorGrid', 'on')
set(gca, 'YMinorGrid', 'on')

set(gcf, 'PaperPositionMode', 'Manual');
set(gcf, 'PaperPosition', [0 0 7.0 3.0])
print -depsc marsfig
