2次元上で楕円を描く​にはどのようにしたら​よいでしょうか。

73 visualizaciones (últimos 30 días)
SHOTA TAKINO
SHOTA TAKINO el 7 de Oct. de 2020
Respondida: Akira Agata el 8 de Oct. de 2020
2次元上での楕円の描き方がわかりません。
教えていただけるとありがたいです。

Respuestas (1)

Akira Agata
Akira Agata el 8 de Oct. de 2020
いろいろなやり方がありますが、たとえば陰関数をプロットする fimplicit 関数を使う方法はいかがでしょうか?
一例として、楕円をあらわす方程式 (x/a)^2 + (y/b)^2 = 1 を a=5, b=2 としてプロットすると以下のようになります。
a = 5;
b = 2;
fnc = @(x,y) (x/a).^2 + (y/b).^2 -1;
figure
fimplicit(fnc)
ylim([-5 5])
grid on

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!