Solve system of equations graphically

Hello, I am a total beginer with matlab and need to solve a system of equations graphically
Here is the system of equations:
Thanks in advance!

3 commentaires

Torsten
Torsten le 1 Nov 2022
Modifié(e) : Torsten le 1 Nov 2022
Use "plot" to plot the two functions (e.g. for 0.5 <= x <= 2 and -2 <= x < = -0.5) and see where the curves intersect.
Gintaras
Gintaras le 2 Nov 2022
Modifié(e) : Gintaras le 2 Nov 2022
x=-5:5
x = 1×11
-5 -4 -3 -2 -1 0 1 2 3 4 5
y=x.^3
y = 1×11
-125 -64 -27 -8 -1 0 1 8 27 64 125
z=6./x
z = 1×11
-1.2000 -1.5000 -2.0000 -3.0000 -6.0000 Inf 6.0000 3.0000 2.0000 1.5000 1.2000
plot(x,y,x,z)
am I doing this correctly?
I tested your code:
x = -5:0.05:5;
y1 = x.^3;
y2 = 6./x;
plot(x, y1, x, y2)
xticks([-5:5])

Connectez-vous pour commenter.

Réponses (1)

Alternatively, you can also do like this:
Solve or plot this polynomial:
x = -2:0.01:2;
y = x.^4 - 6;
plot(x, y), grid on
yline(0, '--')

Catégories

En savoir plus sur Programming dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by