Real solutions to a polynomial

1 次查看(过去 30 天)
Robert Bag
Robert Bag 2021-4-24
评论: Robert Bag 2021-4-24
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 个评论
Robert Bag
Robert Bag 2021-4-24
>> 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 2021-4-24
O know b and c are not monomial and coefficents of highest order is non-zero though

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2021-4-24
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

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by