Plotting a parametric curve in Matlab..(Dimension error)
Show older comments
Hey all, i'm trying to plot the contours of constant e=0, 0.1, 0.2, 0.3 and 0.4 using the parametric expression of
x=e*cos(theta)/sqrt(4/3+4/3*cos(theta)*sin(theta) , y=e*sin(theta)/sqrt(4/3+4/3*cos(theta)*sin(theta))
---------------------------------------------------------------------------------------------------------------------------------------
I tried it like this, but got errors on dimension.
When i tried on ,for example, e=0.1 case,
theta=0:0.1:(2*pi);
e=0.1;
x=e*cos(theta)/sqrt(4/3+4/3*cos(theta)*sin(theta));
y=e*sin(theta)/sqrt(4/3+4/3*cos(theta)*sin(theta));
plot(x,y)
then, i got error message about dimension errors in matrix multiplication. Could you help me on this ?
and my last question is, Is there a way to change only the e-values and show them all in one picture?
Thank you
Accepted Answer
More Answers (0)
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!