Documente Academic
Documente Profesional
Documente Cultură
Facultatea CIM
Catedra Mecanica Teoretic
Raport
despre lucrarea de laborator nr.2
la Mecanica realizat in Matlab
Tema: Grafica n sistemul Matlab
A efectuat:
Gona Vasile
A verificat:
Balmu Ion
Chiinu, 2014
Sarcina Lucrrii Nr. 2
I.
II.
f ( x )=x 2 sinx
III.
x [ , ]
g ( x ) =xcosx
z ( x , y ) =( 1+ xy ) [sin ( xy ) + x ]
x [-1,1]
y [ , ]
ndeplinirea lucrrii
I.
>> g=x.*cos(x);
>> figure(2)
>> plot(x,g)
>> grid on
>> figure(3)
>> plot(x,f,x,g)
>> grid on
>>figure(4)
>>subplot(1,3,1)
>>plot(x,f)
>>grid on
>>subplot(1,3,2)
>>plot(x,g)
>>grid on
>>subplot(1,3,3)
>>plot(x,f,x,g)
>>grid on
>>figure(5)
>>subplot(3,1,1)
>>plot(x,f)
>>grid on
>>subplot(3,1,2)
>>plot(x,g)
>>grid on
>>subplot(3,1,3)
>>plot(x,f,x,g)
>>grid on
>>figure(6)
>>subplot(2,2,1)
>>plot(x,f)
>>grid on
>>subplot(2,2,[2,4])
>>plot(x,f,x,g)
>>grid on
>>subplot(2,2,3)
>>plot(x,g)
>>grid on
>>figure(7)
>>subplot(2,2,[1,2])
>>plot(x,f,x,g)
>>grid on
>>subplot(2,2,3)
>>plot(x,f)
>>grid on
>>subplot(2,2,4)
>>plot(x,g)
>>grid on
III.
>> x=-1:0.1:1;
>> y=-pi:0.1:pi;
>> [x,y]=meshgrid(x,y);
>> z=(1+x.*y).*(sin(x.*y)+x);
>> figure (8)
>> mesh(x,y,z)
>> surf(x,y,z)
>> colormap(autumn)
>> contourf(x,y,z,20)