slinky - % 2*r*pi with n points, x and y are cos(theta) and...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 %========================================================================== % Problem 6. Plotting a Slinky %-------------------------------------------------------------------------- % % Problem Statment: % % Write a function named slinky which takes in a number r, which is the % number of revolutions, and a number n, which is the number of points. % Your function should then plot a 3D spiral where theta ranges from 0 to
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % 2*r*pi with n points, x and y are cos(theta) and sin(theta), and z is % theta. You plot should have a title and labels. Your function does not % return anything % function result = slinky(r,n) close all figure theta = linspace(-r.*pi,r.*pi,n) plot3(sin(theta),cos(theta),theta) Sheet1 Page 2 it just creates a plot....
View Full Document

Page1 / 2

slinky - % 2*r*pi with n points, x and y are cos(theta) and...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online