Solving cubic equation with imaginary numbers

4 次查看(过去 30 天)
Hi everyone
I want to solve this equation by multiplying these variables with imaginary numbers and get clear result with s variable and output is in some weird form. What's wrong?
My code below .
clc;
clear;
s1 = 133.9457 + 253.416i
s2 = 133.9457 - 253.416i
s3 = 1339.457
syms s
x = solve(0.00017493*(s-s1)*(s-s2)*(s-s3))
Thanks in advance

采纳的回答

Stephan
Stephan 2022-12-2
编辑:Stephan 2022-12-2
s1 = 133.9457 + 253.416i;
s2 = 133.9457 - 253.416i;
s3 = 1339.457;
syms s
x_exactly = solve(0.00017493*(s-s1)*(s-s2)*(s-s3))
x_exactly = 
x_numeric = double(x_exactly)
x_numeric =
1.0e+03 * 1.3395 + 0.0000i 0.1339 - 0.2534i 0.1339 + 0.2534i
  3 个评论
Stephan
Stephan 2022-12-2
s1 = 133.9457 + 253.416i;
s2 = 133.9457 - 253.416i;
s3 = 1339.457;
syms s
x_exactly = expand(0.00017493*(s-s1)*(s-s2)*(s-s3))
x_exactly = 

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numbers and Precision 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by