Matlab First Attempt by Ntam Gilbert Agha
Matlab First Attempt by Ntam Gilbert Agha
a=2;
b=3;
z1=a+i*b;
z1=2.0000+ 3.0000 I;
i=2;
a=2;
b=3;
z2=a+i*b;
z2=8.0000;
amod=abs(z2)
z2arg=angle(z2)
xv=[-4:.01:4]
yv=(xv.^4 -1) ./(7 *xv.^4 + 32 * xv.^3 +12 * xv.^2 + 32 * xv + 7);
figure(1);
clf;
plot(xv,yv);
x1=[-4:.01:-0.23];
x2=[-0.22:0.01:4];
x=x1;
y1= (x.^4 - 1) ./ (7*x.^4 + 32 * x.^3 + 12 * x.^2 + 32 * x + 7);
x=x2;
y2= (x.^4 - 1) ./ (7 * x.^4 + 32 * x.^3 + 12 * x.^2 + 32 * x + 7);
figure(2);
plot(x1,y1,x2,y2);
x=[-1:0.05:1];
y=[-1:0.05:1];
m=length(x);
n=length(y);
for i=1:m
for j=1:n
z(i,j) =2 * y(j) * x(i)^2 - 2 * y(j)^2 + x(i)^3;
end
end
figure(1);
surf(x,y,z);
xlabel('x');
ylabel('y');
zlabel('z');
print -deps c:\matlab5\sources\polycopie\surf3d.eps
figure(2);
contour(x,y,40); %pour 40 courbes de niveau
print -deps c:\matlab5\sources\polycopie\contour.eps