Register to reply 
Matlab generating parametric curves 
Share this thread: 
#1
Jan1410, 05:04 PM

P: 916

I want to graph the following parametric curve using matlab:
x = 31cos(t)7cos(31/7)t y = 31sin(t)7sin(31/7)t 0 ≤ t ≤ 14π This is the code I used:



#2
Jan1510, 04:07 AM

Sci Advisor
P: 1,724

When you use a (2D) parametric equation, you don't express x or y in terms of each other, you do it in terms of a third variable (as you've done). However, at the end of the day, you should still have a set of XY coordinates.
Instead of plotting x as a function of t, and then plotting y as a function of t (as you're doing), just plot y as a function of x: >> plot(x, y) 


#3
Jan1510, 02:13 PM

P: 916

Well, the curve I'm trying to produce is supposed to look like this:
But when I even use this code:
I can't see the problem. 


#4
Jan1510, 02:27 PM

Sci Advisor
P: 1,724

Matlab generating parametric curves
http://linuxgazette.net/133/luana.html You may want to try again with: x=31*cos(t)  7*cos((31/7)*t); y=31*sin(t)  7*sin((31/7)*t); I don't know if you know about the MATLAB axis command, but you can use it (or rather 'axis square') to have equal scaling on both axes: http://www.mathworks.com/access/help.../ref/axis.html EDIT: You may also wish to use a smaller step size for t, say 0.1 or 0.01 instead of 1, as you currently have it. 


#5
Jan1510, 03:25 PM

P: 448

On the other hand, the modified parametric equations



#6
Jan1510, 05:22 PM

P: 916

Okay thanks A LOT guys. :)



#7
Jan1510, 07:02 PM

P: 916

By the way, when you are ploting this in Mathematica, what is the code for changing the color of the plot?



Register to reply 
Related Discussions  
Parametric curves  Calculus & Beyond Homework  13  
Parametric curves applications  Calculus & Beyond Homework  5  
Parametric Curves  Calculus  0  
Parametric Curves..HELP  Introductory Physics Homework  2 