ch09 - Chapter 9 Solved Problems Problem 1 Script file...

This preview shows pages 1–7. Sign up to view the full content.

1 Chapter 9 Solved Problems Problem 1 Script file: t=0:0.1:30; r=1+0.1*t; x=r.*cos(t); y=r.*sin(t); z=0.2.*sqrt(t); plot3(x,y,z, 'k' , 'linewidth' ,1) grid on xlabel( 'x' ); ylabel( 'y' ); zlabel( 'z' ) Figure: -4 -2 0 2 4 -4 -2 0 2 4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 x y z

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Chapter 9: Solved Problems Problem 2 Script file: a=10; b=5; ep=sqrt(1-(b/a)^2); n=4; h=6; t=linspace(0,2*pi*n,400); r=b./sqrt(1-ep^2*cos(t).^2); x=r.*cos(t); y=r.*sin(t); z=h*t/(2*pi*n); plot3(x,y,z) grid on xlabel( 'x (m)' ); ylabel( 'y (m)' ); zlabel( 'z (m)' ) Figure: -10 -5 0 5 10 -5 0 5 0 1 2 3 4 5 6 x (m) y (m) z (m)
Chapter 9: Solved Problems 3 Problem 3 Script file: t=linspace(0,10,100); r=8+0.6*t; phi=5*pi*t/180; theta=8*pi*t/180; x=r.*cos(phi).*cos(theta); y=r.*cos(phi).*sin(theta); z=r.*sin(phi); plot3(x,y,z, 'k' , 'linewidth' ,1) grid on xlabel( 'x (m)' ); ylabel( 'y (m)' ); zlabel( 'z (m)' ) view(45,30) Figure: 0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10 12 y (m) x (m) z (m)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Chapter 9: Solved Problems Problem 4 Script file: x=-2:0.2:2; y=-2:0.2:2; [X,Y]=meshgrid(x,y); Z=4*sqrt(X.^2/2+Y.^2/2+1); surf(X,Y,Z) xlabel( 'x' ); ylabel( 'y' ); zlabel( 'z' ) figure contour3(X,Y,Z, 'k' ) xlabel( 'x' ); ylabel( 'y' ); zlabel( 'z' ) Figures: -2 -1 0 1 2 -2 -1 0 1 2 4 5 6 7 8 9 x y z -2 -1 0 1 2 -2 -1 0 1 2 4 5 6 7 8 9 x y
Chapter 9: Solved Problems 5 Problem 5 Script file: k=0.01; x=-3:0.25:3; y=-3:0.25:3; [X,Y]=meshgrid(x,y); Z=k*(X.^2-Y.^2); surf(X,Y,Z) xlabel( 'x' ); ylabel( 'y' ); zlabel( 'w' ) Figure: -4 -2 0 2 4 -4 -2 0 2 4 -0.1 -0.05 0 0.05 0.1 x y w

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Chapter 9: Solved Problems Problem 6 Script file: L=60; m=2; n=3; x=0:2:L; y=0:2:L; [X,Y]=meshgrid(x,y);
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 18

ch09 - Chapter 9 Solved Problems Problem 1 Script file...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online