









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to 3d plotting in matlab, covering the basics of constructing plots, choosing different plot types, and the anatomy of a 3d plot. It also explores various topics such as plotting in 3d, using the meshgrid() function, 3d mesh plots, surface plots, shading and light sources, contour plots, and using color to add a fourth dimension. The document emphasizes the power of matlab for 3d plotting and its applications in engineering.
Typology: Study notes
1 / 16
This page cannot be seen from the preview
Don't miss anything!










clf turns=40.pi; theta=linspace(0,turns,4000); x=cos(theta).(turns-theta)./turns; y=sin(theta).*(turns-theta)./turns; z=theta./turns; plot3(x,y,z) grid on text(0.5,0.5,0.75,'Here is a piece of text!');
Here is a piece of text!
theta=0:0.1:10.*pi; plot3(sin(theta),cos(theta),theta) grid on
0
1
0
1
0
10
20
30
40
0
2
0
2
0
5
10
y-axis x-axis
z-axis
x =-3 -2 -1 0 1 2 3 y =-3 -2 -1 0 1 2 3 z=f(x,y)
xx =-3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3
yy =-3 -3 -3 -3 -3 -3 - -2 -2 -2 -2 -2 -2 - -1 -1 -1 -1 -1 -1 - 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 z=f(xx,yy)
x=-3.5:3.5; y=-2.5:2.5; [xx,yy]=meshgrid(x,y) xx = -3.5 -2.5 -1.5 -0.5 0.5 1.5 2.5 3. -3.5 -2.5 -1.5 -0.5 0.5 1.5 2.5 3. -3.5 -2.5 -1.5 -0.5 0.5 1.5 2.5 3. -3.5 -2.5 -1.5 -0.5 0.5 1.5 2.5 3. -3.5 -2.5 -1.5 -0.5 0.5 1.5 2.5 3. -3.5 -2.5 -1.5 -0.5 0.5 1.5 2.5 3. yy = -2.5 -2.5 -2.5 -2.5 -2.5 -2.5 -2.5 -2. -1.5 -1.5 -1.5 -1.5 -1.5 -1.5 -1.5 -1. -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0. 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0. 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1. 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.
Fig 26.5a: Opaque Fig 26.5b: Transparent
y-axis x-axis
z-axis
y-axis x-axis
z-axis
y-axis
Curvature
0
2
4
6
-3 -2 -1 0 1 2 3
0
1
2
3
x-axis
y-axis
0
2
4
6
-3 -2 -1 0 1 2 3
0
1
2
3
x-axis
y-axis