Real solutions to a polynomial

3 views (last 30 days)
Robert Bag
Robert Bag on 24 Apr 2021
Commented: Robert Bag on 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 Comments
Robert Bag
Robert Bag on 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 on 24 Apr 2021
O know b and c are not monomial and coefficents of highest order is non-zero though

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 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

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!