How to plot this implicit function? (It's one parameter also changes)

1 ビュー (過去 30 日間)
Binayak Behera
Binayak Behera 2022 年 9 月 11 日
編集済み: John D'Errico 2022 年 9 月 11 日
Here Φ also varies.
First i got that it is an implicit function. So, fimplicit should be used. But i'm unable to take Φ varied.

回答 (2 件)

Torsten
Torsten 2022 年 9 月 11 日
編集済み: Torsten 2022 年 9 月 11 日
So you want several implicit plots in different colors for different values of phi ?
Use "fimplicit" in a loop using "hold on" before the loop.
phi = [pi/4 3*pi/8 pi/2 5*pi/8 3*pi/4];
hold on
for i=1:numel(phi)
fun = @(x,y) y.^4 + y.^2.*(2*x*tan(phi(i))-1) + x.^2.*sec(phi(i))^2;
fimplicit(fun);
end
hold off

John D'Errico
John D'Errico 2022 年 9 月 11 日
編集済み: John D'Errico 2022 年 9 月 11 日
The vertical axis indicates the value of phi.
F3 = @(x,y,phi) y.^4 + y.^2.*(2*x.*tan(phi)-1) + x.^2.*sec(phi).^2;
fimplicit3(F3)
xlabel x
ylabel y
zlabel phi
So at any fixed phi, you will get a simple path through the (x,y) plane, indicating the solution locus for that value of phi.
And for a fixed set of values of phi, you can use fimplicit to get the curves as shown by @Torsten.

カテゴリ

Find more on Line Plots in Help Center and File Exchange

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by