You are on page 1of 5

A=[0 -6 -1

6 2 -16
-5 20 -10]
X=[];
X0=[1
1
1];

for t=0:.01:1
X=[X expm(t*A)*X0];
end
plot3(X(1,:),X(2,:),X(3,:),'-o')
grid
[x,y]=meshgrid(-3:1:3);
z=peaks(x,y);
surf(x,y,z)
[X,Y,Z]=peaks;
contour3(X,Y,Z,20)
h=findobj('Type','patch');
set(h,'LineWidth',2)
title('20 de contururi pt. functia peaks')
Grafice Pie

x=[1 3 0.5 2.5 2]


explode=[0 0 0 1 0] % portiunea care se desprinde
pie3(x,explode)
colormap hsv
Realizarea unui octogon

t=(1/16:1/8:1)'*2*pi;
x=sin(t);
y=cos(t);
fill(x,y,'r')
axis square

You might also like