Real solutions to a polynomial

4 Ansichten (letzte 30 Tage)
Robert Bag
Robert Bag am 24 Apr. 2021
Kommentiert: Robert Bag am 24 Apr. 2021
Hi, I am stuck to this task: I am trying only to get the real solutions to the function
A = [1 -12 55 -120 124 -80]
B = roots(A)
  4 Kommentare
Robert Bag
Robert Bag am 24 Apr. 2021
>> Matlab412
a =
1
2
2
3
4
b =
root(z^6 - z^4/5 + 14*z^2 - 2*z - 10, z, 1)
root(z^6 - z^4/5 + 14*z^2 - 2*z - 10, z, 2)
c =
root(z^5 - 4*z^3 + 4*z^2 - (4*z)/3 - 10/3, z, 1)
root(z^5 - 4*z^3 + 4*z^2 - (4*z)/3 - 10/3, z, 4)
root(z^5 - 4*z^3 + 4*z^2 - (4*z)/3 - 10/3, z, 5)
d =
2
2
2
2
5
Robert Bag
Robert Bag am 24 Apr. 2021
O know b and c are not monomial and coefficents of highest order is non-zero though

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 24 Apr. 2021
A = randi([-9 9], 1, 6)
A = 1×6
-7 -4 4 4 -2 9
B = roots(A)
B =
-1.0813 + 0.6487i -1.0813 - 0.6487i 1.0967 + 0.0000i 0.2472 + 0.8223i 0.2472 - 0.8223i
B(imag(B)==0)
ans = 1.0967

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by