How do I plot parabolas and other functions in MATLAB?

271 vues (au cours des 30 derniers jours)
Joseph Percsy
Joseph Percsy le 15 Mar 2013
Réponse apportée : Fahad le 27 Oct 2022
I'm trying to plot x2 +9y2 = 36 in MATLAB, but it just doesn't want to work, even if I split it up to 1/3sqrt(36 − x2) and −1/3sqrt(36 − x2)
I'm having trouble understanding what x=5:.5:5 means as well.
The second half of the question is y =3/2sin(2x +3) (I've already graphed this easily), and I need to find simultaneous solutions with the above function. Is ginput good enough for this?

Réponse acceptée

Youssef  Khmou
Youssef Khmou le 15 Mar 2013
hi Joseph,
the expression means : variable=beginning:step:end , but 5:.5:5 is constant its 5 then . you can also plot the parabola just the way you did to the second equation :
x=-10:0.1:10;
y=sqrt((36-x.^2)/9);
plot(x,y)

Plus de réponses (3)

Muhammad AFZAL
Muhammad AFZAL le 4 Avr 2019
x=-10:0.1:10;
y=sqrt((36-x.^2)/9);
plot(x,y)

kirthika s
kirthika s le 24 Avr 2021
Parabolic

Fahad
Fahad le 27 Oct 2022
x=-10:0.1:10;
y=sqrt((36-x.^2)/9);
plot(x,y)

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!

Translated by