MATLAB Answers

how to plot an ellipse having her equation?

11 ビュー (過去 30 日間)
Jeffersson Carvalho
Jeffersson Carvalho 2019 年 11 月 12 日
Commented: Jeffersson Carvalho 2019 年 11 月 14 日
First, sorry for my English (I'm using the translator), I'm new to matlab, I have a job that needs to plot an ellipse using matlab, I already have the equation, which in this case is "x² / 25 + y² / 9 = 1" , but I don't know anything about matlab, so I don't know how to draw from the equation.
Kind regards.

  0 件のコメント

サインイン to comment.

件の回答 (1)

John D'Errico
John D'Errico 2019 年 11 月 12 日
First, learn how to write a function.
fun = @(x,y) x.^2 / 25 + y.^2 / 9 - 1;
Note the use of the .^ operators. They will be important in your use of MATLAB.
Next, learn how to use a tool like fimplicit. (Read the help for it. I won't do everything for you.)
Finally, learn why
axis equal
wil be important. If you don't use that, then what is drawn won't look like the ellipse you might expect. See what the figure looks like before you call axis, then look at it after the call.
But really, if you have no idea how to use MATLAB, then READ the getting started tutorials.

  1 件のコメント

Jeffersson Carvalho
Jeffersson Carvalho 2019 年 11 月 14 日
First of all, thanks, I really don't want them to do everything.
It's a university work where I have to create an ellipse equation based on the proposed conditions and then plot the ellipse in matlab using the equation found so we can look at what the ellipse looks like, the matlab part is the final and the only one that I I need help because the rest I've done.

サインイン to comment.

サインイン してこの質問に回答します。


Translated by