how to transform a complex equation to a trigonometric function form?

14 ビュー (過去 30 日間)
jing
jing 2014 年 6 月 3 日
コメント済み: Star Strider 2021 年 7 月 17 日
I have a complex equation like this-(5746772847587216969320685600118169822982082276949701951610533185511*exp((72904590186540958068117318959024937034055680*x*i)/14834859346081795520881636801061155781141830677))/23147970522987067069884769431432445012502993199558109347048325120000 + (41599612658116695904845876729613416447229334433995796300250749185439*exp((137752303494633663599702993999275021398179840*x*i)/14834859346081795520881636801061155781141830677))/4629594104597413413976953886286489002500598639911621869409665024000 + (28362175122705238373636542692374717152762842256598930556679573043671*(1/exp((5583316590711408616116494615509809860968448*x*i)/5017673014115901297250206286887358756475835969)))/23147970522987067069884769431432445012502993199558109347048325120000 - (18384791256775548276066453844694518962850997062684442545274081216559*exp((16350468792908182397149333533303040032899072*x*i)/5017673014115901297250206286887358756475835969))/4629594104597413413976953886286489002500598639911621869409665024000=0
Now,I'm trying to reform it into a trigonometric function form so that I can get the real & imaginary part. who konws how?

回答 (1 件)

Star Strider
Star Strider 2014 年 6 月 3 日
The rewrite function can use the Euler identities to convert the complex exponential to the trigonometric form you want:
syms x
f = (5746772847587216969320685600118169822982082276949701951610533185511*exp((72904590186540958068117318959024937034055680*x*i)/14834859346081795520881636801061155781141830677))/23147970522987067069884769431432445012502993199558109347048325120000 + (41599612658116695904845876729613416447229334433995796300250749185439*exp((137752303494633663599702993999275021398179840*x*i)/14834859346081795520881636801061155781141830677))/4629594104597413413976953886286489002500598639911621869409665024000 + (28362175122705238373636542692374717152762842256598930556679573043671*(1/exp((5583316590711408616116494615509809860968448*x*i)/5017673014115901297250206286887358756475835969)))/23147970522987067069884769431432445012502993199558109347048325120000 - (18384791256775548276066453844694518962850997062684442545274081216559*exp((16350468792908182397149333533303040032899072*x*i)/5017673014115901297250206286887358756475835969))/4629594104597413413976953886286489002500598639911621869409665024000;
f = rewrite(f, 'sincos')
Ref = simplify(collect(real(f))) % Real part
Imf = simplify(collect(imag(f))) % Imaginary part
  2 件のコメント
Pavel Podder
Pavel Podder 2021 年 7 月 17 日
thank u
Star Strider
Star Strider 2021 年 7 月 17 日
My pleasure!
.

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

カテゴリ

Help Center および File ExchangeWeather and Atmospheric Science についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by