![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/360544/image.png)
Making a parabola and plotting
237 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Nicholas Deosaran
le 15 Sep 2020
Réponse apportée : Hakon Hannesson
le 27 Sep 2021
how can you make a parabola (is it not y = ax^2)? and plot it.
Also how to overlay two more parabolas on the same axes using 0.5a and 2a
0 commentaires
Réponse acceptée
Ameer Hamza
le 15 Sep 2020
You need to use hold() to plot multiple lines on one axes
x = linspace(-5, 5, 100);
y1 = 0.5*x.^2;
y2 = 2*x.^2;
f = figure();
ax = axes();
hold(ax); % to plot multiple lines on one axes
plot(x, y1);
plot(x, y2);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/360544/image.png)
0 commentaires
Plus de réponses (2)
Voir également
Catégories
En savoir plus sur Annotations 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!