Problém with graph of implicit function

Hi, I would like to asi for some help. I have implicit equation: f = (x² + y² - ax)² = a²(x² + y²) My assignment is to draw graphs using fimplicit(f) for a = [1 2 3 4 5 6 7 8]. But when I use something as: a= linspace(1,1,8) f = @(x,y) (x² + y² - ax)² - a²(x² + y²) fimplicit(f). It says that "arrays have incompatable sizes for this operation". Could some one please help me with this problem?

 採用された回答

John D'Errico
John D'Errico 2022 年 11 月 21 日

0 投票

If you change the value of a, then the implicit function itself changes.
So you MIGHT decide to use fimplicit3. But if you need show those curves for each value of a, you probably need to use a loop.
fxya = @(x,y,a) (x.^2 + y.^2 - a.*x).^2 - a.^2.*(x.^2 + y.^2);
a = 1:8;
for ai = a
fxy = @(x,y) fxya(x,y,ai);
fimplicit(fxy,[-3,18,-12,12])
hold on
end
grid on

1 件のコメント

Pavel
Pavel 2022 年 11 月 21 日
Thank you a lot, thats exactly what I was looking for. I tried to play with it a bit, and it all makes a sense to me now. You saved me quite a lot of time with this.
Have a great rest of a day and once more thanks to you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

製品

リリース

R2022a

質問済み:

2022 年 11 月 21 日

コメント済み:

2022 年 11 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by