This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 3D Plotting3D PlottingT. MerckerAerospace Engineering and Engineering MechanicsThe University of Texas at AustinASE 201: Introduction to Computer ProgrammingApril 13, 2009T. Mercker3D Plotting3D PlottingIYou have already done 2D plotting with plot() and scatter()IIn general, you hady=f(x)where x is an independent variable and y isa dependent variableIExample: The height of a thrown ball is dependent on timeh(t) =h+vy,t12gt2T. Mercker3D Plotting3D PlottingIIn 3D, you have three possibilities for curves1.You have 1 independent variable and two dependent variables such thatx(t) =f(t)y(t) =g(t)IThis defines a 3D space int,xandyIThis scenario is represented by a line in 3D space2.You have 1 independent variable and three dependent variables suchthatx(t) =f(t)y(t) =g(t)z(t) =h(t)IThis defines a 3D space inx,yandzIThis scenario is represented by a line in 3D space and is commonin the evolution of Cartesian coordinates in 3 dimensionsT. Mercker3D Plotting3D PlottingIWhen plotting lines in 3D, there are builtin MATLAB functions that areanalogous to plot() and scatter()Iplot3() connects points by a line in 3DISyntax:plot3(x1,y1,z1,x2,y2,z2,...,options)Iplot3 has the same capabilities and options as plotIscatter3() makes a point by point plot in 3DISyntax:scatter3(x,y,z,options)Iscatter3 has the same capabilities and options as scatterT. Mercker3D Plotting3D Plotting...
View
Full
Document
This note was uploaded on 04/29/2009 for the course ASE 201 taught by Professor Hayes during the Spring '07 term at University of Texas.
 Spring '07
 Hayes

Click to edit the document details