How can I draw this ellipse on MatLab
Ältere Kommentare anzeigen
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 Kommentar
per isakson
am 15 Feb. 2014
Bearbeitet: per isakson
am 15 Feb. 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.
Akzeptierte Antwort
Weitere Antworten (1)
Mathieu Bouchard
am 16 Feb. 2014
0 Stimmen
Kategorien
Mehr zu Programming finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!