AME 150L Lecture Notes - Lecture 20: Contour Line

53 views5 pages

Document Summary

Ame 150: introduction to computational methods - lecture #20: more on plots. 3-d space x(ii), y(ii), z(ii); plot3(x,y,z) plot(x,y), x(ii), y(ii), ii=1:n. %plot of a helix in 3d period=2; radius=1; vz=0. 2; t=0:0. 1:6; x=radius*cos(2*pi/period*t); y=radius*sin(2*pi/period*t); z=vz*t; figure(1); % plot y vs x plot(x,y); axis equal; figure(2); % plot a helix plot3(x,y,z) title("plot of a helix"); xlabel("x"); ylabel("y"); zlabel("z"); grid on; Animation generate number of plots, each saved in a frame, playback all frames. Getframe save plot of as an element of array m. Movie(m,n) plays back frames n times (if n>0, plays forward; if n<0, plays backwards) Have to fix the angle that we"re looking at this from so that matlab doesn"t automatically change. %script file to generate a movie of an object. % create frames of the movie and save in array m for k=1:nframes. %stores that point in array m end hold off; Surface (carpet), mesh, and contour plots z=z(x,y) surf(x,y,z) x,y,z are the same size.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents