Solving cubic equation with imaginary numbers

4 Ansichten (letzte 30 Tage)
jayvoor
jayvoor am 2 Dez. 2022
Kommentiert: jayvoor am 2 Dez. 2022
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

Akzeptierte Antwort

Stephan
Stephan am 2 Dez. 2022
Bearbeitet: Stephan am 2 Dez. 2022
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 Kommentare
Stephan
Stephan am 2 Dez. 2022
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 = 
jayvoor
jayvoor am 2 Dez. 2022
Thank you very much!! Have a good day sir :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by