مشاهدة النسخة كاملة : مساعدة في ال3d plotting


rababm
09-04-2007, 01:05 AM
السلام عليكم ارجو من لديه خبرة ان يساعدني حتي افهم بعض الامثلة في ال3d plootting
و ادعو لي بالنجاح
Plot of function z=sinx cosy e−(x2+y2)0.5
using mesh

t = −4:0.3:4;
[x,y] = meshgrid(t,t);
z = sin(x).*cos(y).*exp(−(x.^2+y.^2).^0.5);
mesh(x,y,z), axis off



Plot of function z=−0.1/(x2+y2+1)
u s i n g m e s h z
x= −3:0.3:3; y=x;
[x, y]=meshgrid(x,y);
z=−0.1./(x.^2+y.^2+.1);
meshz(z) , axis off
view(−35, 60)

Discrete plot of
using stem3
x=t, y=t cost, z=e0.1t
t=0:.2:20;
x=t; y=t.*cos(t);
z=exp(0.1*t);
stem3(x,y,z), axis off


Plot of a unit sphere and a scaled sphere
using sphere function
[x,y,z]=sphere(24);
subplot(2,2,2), surf(x−2, y−2, z−1);
hold on
surf(2*x, 2*y,2*z);
axis off


Cartezian plot of Bessel function

j0i[x2+y2]1/2 −12<x<12, −12<y<12
[x,y]=meshgrid(−12:.7:12, −12:.7:12);
r=sqrt(x.2+y.2);z= bessel(0,r);
m=[−45 60]; mesh(z,m), axis off



Contour lines and directional vectors
using contour and quiver functions
[x,y,z]=peaks(20);
[nx, ny]=gradient(z,1,1);
contour(x,y,z,10)
hold on
quiver(x,y,nx,ny)

Graphs of Example 1.17.