rotLineCircle

# rotLineCircle - %be performed around the origin in the xy...

This preview shows page 1. Sign up to view the full content.

function rotLineCircle(u,v,num) %This function, rotLineCircle, takes in vectors of x and y data and %rotates them about the origin. The data should be rotated 360 degrees; %however, the data should be rotated in n equal steps where n is the %third input. The data should be plotted after each step such that the %end result is a plot that consists of the original data copied n times, %with each copy rotated at a different angle aound the origin. The %angle between all adjacent curves must be equal and the rotation should
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %be performed around the origin in the xy plane (2-D rotation). The %scale used on the x and y axes should be equal to each other. All your %curves should be blue and solid. This function has no outputs, it only %produces a plot (and possibly some mild enjoyment). %usage: rotLineCircle(u,v,num); th = linspace(0,2.*pi,num+1); for x = th A = [cos(x) -sin(x); sin(x) cos(x)]; new = [u;v]; arr = A*new; vecx = arr(1,:); vecy = arr(2,:); plot(vecx,vecy); hold on; end axis equal; end...
View Full 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.

Ask a homework question - tutors are online