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 件のコメント

Torsten
Torsten 2022 年 11 月 1 日
編集済み: Torsten 2022 年 11 月 1 日
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 2022 年 11 月 2 日
編集済み: Gintaras 2022 年 11 月 2 日
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?
Sam Chak
Sam Chak 2022 年 11 月 2 日
I tested your code:
x = -5:0.05:5;
y1 = x.^3;
y2 = 6./x;
plot(x, y1, x, y2)
xticks([-5:5])

サインインしてコメントする。

回答 (1 件)

Sam Chak
Sam Chak 2022 年 11 月 2 日

0 投票

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, '--')

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

質問済み:

2022 年 11 月 1 日

回答済み:

2022 年 11 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by