%torquecurves.m - Torquecurves as functions of angular and linear velocity
% kja 060727

aminit;			                     % initializing MATLAB
cruise_carpar                                % get parameters for car

%Torque as a function of angular velocity
w=0:10:700;
T=Tm*(1-bbeta*(w/wm-1).^2);
figure(1); clf; subplot(221)
pl=plot(w,T,'b-');
set(pl, 'Linewidth', AM_data_linewidth);
amaxis([0 700 100 200]); grid on;
xlabel('Angular velocity \omega [rad/s]');
ylabel('Torque {\itT} [Nm]');

amprint('cruise-torquecurve.eps');

%Torque as a function of velocity for different gears
figure(2); clf; subplot(221);
v=0:1:70;
for al=gears,                               
    w=al*v;
    T=Tm*(1-bbeta*(w/wm-1).^2);
    pl=plot(v,T,'b-');
    set(pl, 'Linewidth', AM_data_linewidth);
    hold on
end
amaxis([0 70 100 200]); grid on;
amtext(11.5, 120, '{\itn}=1');
amtext(24, 120, '{\itn}=2');
amtext(42.5, 120, '{\itn}=3');
amtext(58.5, 120, '{\itn}=4');
amtext(58.5, 185, '{\itn}=5');
xlabel('Velocity {\itv} [m/s]');
ylabel('Torque {\itT} [Nm]');

amprint('cruise-gearcurves.eps');
