How to plot this in MATLAB?

조회 수: 2 (최근 30일)
simran
simran 2024년 4월 3일
댓글: Sam Chak 2024년 4월 5일
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
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일
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개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by