How to plot this in MATLAB?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I wanted to draw this graph. If someone could help me with the MATLAB code for this graph with a brief explanation about it?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1658636/image.jpeg)
6 commentaires
Sam Chak
le 3 Avr 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?
Réponse acceptée
Jonas
le 4 Avr 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!