Documente Academic
Documente Profesional
Documente Cultură
Overview
● Integrated plotting is one of the most useful tools available in MATLAB
>> x=[-2*pi:pi/12:2*pi];
>> f_x=3*x.*sin(x)-2*x;
>> df_dx=3*(x.*cos(x)+sin(x))-2;
Plotting them on the same graph
>> figure
>> plot(x,f_x,x,df_dx,'--');
>> title('f(x), df/dx vs. x')
>> legend('f(x)','df/dx')
>> ylabel('f(x), df/dx')
>> xlabel('x')
P o s it io n
300
200
x (t) [m ]
100
0
0 1 2 3 4 5 6 7
t [s e c o n d s ]
V e lo c it y
200
100
v (t) [m /s ]
-1 0 0
0 1 2 3 4 5 6 7
t [s e c o n d s ]
A c c e le ra t io n
40
a (t) [m /s 2 ]
20
0
0 1 2 3 4 5 6 7
t [s e c o n d s ]