# How to plot this in MATLAB?

10 visualizzazioni (ultimi 30 giorni)
simran il 3 Apr 2024
Commentato: Sam Chak il 5 Apr 2024
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 CommentiMostra 4 commenti meno recentiNascondi 4 commenti meno recenti
Sam Chak il 3 Apr 2024
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 il 4 Apr 2024
"I am not able to do it this way."
@simran, which way?

Accedi per commentare.

### Risposta accettata

Jonas il 4 Apr 2024
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 CommentiMostra NessunoNascondi Nessuno
simran il 5 Apr 2024
How about the black dots on the right?
Sam Chak il 5 Apr 2024
@simran, What are the formulas to determine the coordinates for the "black dots"?
Also, when to apply the parameters {, } and {, } in the "Lemniscate" code?

Accedi per commentare.

### Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

R2023b

### Community Treasure Hunt

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

Start Hunting!

Translated by