フィルターのクリア

Solving cubic equation with imaginary numbers

1 回表示 (過去 30 日間)
jayvoor
jayvoor 2022 年 12 月 2 日
コメント済み: jayvoor 2022 年 12 月 2 日
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 = 
jayvoor
jayvoor 2022 年 12 月 2 日
Thank you very much!! Have a good day sir :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumbers and Precision についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by