rotateBodies

# rotateBodies - function rotateBodies(u,v,th) %Given three...

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

function rotateBodies(u,v,th) %Given three vectors x, z, and theta, write a function rotateBodies that %will generate three plots. Your function should plot the three plots %in the same figure by using the subplot command. The figure should %have 1x3 plots. The plots should be as follows: %1. z vs. x; titled 'z vs. x'. Note that you will have to use %plot3() to correctly plot this in the xz plane rather than the xy %plane as plot() would do. Also, you should use view(0, 0) to make %the plot produced by plot3() show up as 2D as shown in the example %image. %2. z vs. x rotated around the x axis using mesh() with flat shading %and a square axis; titled 'z vs. x about x using mesh'. Turn on %the background grid. %3. z vs. x rotated around the z axis using surf() with interp %shading and a square axis; titled 'z vs. x about z using surf'. %Turn on the background grid. %usage: rotateBodies(u,v,th); subplot(1,3,1); %makes a 1 by 3 subplot with position 1 cols = length(u); %determines the number of columns needed to create the y data

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Institute of Technology.

### Page1 / 2

rotateBodies - function rotateBodies(u,v,th) %Given three...

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

View Full Document
Ask a homework question - tutors are online