I wanted to draw this graph. If someone could help me with the MATLAB code for this graph with a brief explanation about it?

6 件のコメント

Jonas
Jonas 2024 年 4 月 3 日
looks like there should be a formular for that graph since you got the parameters K=1 and n=5. Can you provide the formular?
simran
simran 2024 年 4 月 3 日
編集済み: Sam Chak 2024 年 4 月 3 日
Sam Chak
Sam Chak 2024 年 4 月 3 日
編集済み: Sam Chak 2024 年 4 月 3 日
@simran, Would it be okay for you find some example codes based on the Lemniscate ( symbol) and copy/paste them (click the indentation icon )? This will allow us to directly troubleshoot and fix it.
simran
simran 2024 年 4 月 3 日
I am not able to do it this way.
Sam Chak
Sam Chak 2024 年 4 月 3 日
I apologize, but could you please clarify the specific method or approach you are having difficulty with when searching for example codes on the Internet?
Dyuman Joshi
Dyuman Joshi 2024 年 4 月 4 日
"I am not able to do it this way."
@simran, which way?

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

 採用された回答

Jonas
Jonas 2024 年 4 月 4 日

1 投票

this could work
theta = linspace (-pi/4,pi/4);
x = 0.5*cos(theta).*sqrt(2.*cos(2.*theta));
y = 0.5*sin(theta).*sqrt(2.*cos(2.*theta));
plot(x+0.5,y,-x+0.5,y), grid on,
axis ('equal')
figure;plot([x+0.5 -x+0.5],[y y])
axis equal; grid on;

2 件のコメント

simran
simran 2024 年 4 月 5 日
How about the black dots on the right?
Sam Chak
Sam Chak 2024 年 4 月 5 日
@simran, What are the formulas to determine the coordinates for the "black dots"?
Also, when to apply the parameters {, } and {, } in the "Lemniscate" code?

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

製品

リリース

R2023b

タグ

質問済み:

2024 年 4 月 3 日

コメント済み:

2024 年 4 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by