How can I draw this ellipse on MatLab
Afficher commentaires plus anciens
I need to draw this ellipse on Matlab and i can't. My problem seems to be with the plus-minus symbol.
I don't know how to set my axis to get my ellipse right in the middle of my graph !?
It need to be in :
Y = (0:10)
X = (0:8)
This is what i've done so far :
x=0:0.001:8;
y= (((5*(4+-sqrt(8*x-x.^2)))/4));
plot(x,y);
grid on;
I'm using Matlab R2013a
From a student who need your help please !!!!!!
PS : sorry for the silly mistakes, i'm not an anglophone !!
1 commentaire
per isakson
le 15 Fév 2014
Modifié(e) : per isakson
le 15 Fév 2014
Your code produces half an ellipse.
Matlab doesn't interpret +-sqrt the way you intend.
You can make it two cases and finally concatenate them.
Réponse acceptée
Plus de réponses (1)
Mathieu Bouchard
le 16 Fév 2014
0 votes
Catégories
En savoir plus sur Programming dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!