Plotting equation of two variables
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I'd appreciate some guidance/assistance plotting: y = -sin^3(theta); x = cos^3(theta) All my attempts have produced graphs slightly different than the desired result (see attachment for my graph of reference=desired result). Could it be that the desired result (my graph of reference) was created trying to plot the equation (its solutions rather) y^2/3 + x^2/3 == 1? Mathematically it appears to be similar yet could it have produced a result somewhat different?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160066/image.jpeg)
0 commentaires
Réponses (1)
KSSV
le 23 Jan 2017
theta = linspace(0,2*pi) ;
y = -sin(theta).^3;
x = cos(theta).^3 ;
plot(x,y)
3 commentaires
KSSV
le 23 Jan 2017
I don't think the result is different......to get the plot shown in the image, you need to restrict the values of theta. Use axis([0 1 -1 1]) after plotting using the above code.
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!