How to get exact values from evaluating a (complex number) expression?

For example, when input log(1-i), I want it to return ln(sqrt(2))-pi*i/4, not its numerical approximation.

1 件のコメント

Karan Nandankar
Karan Nandankar 2021 年 3 月 1 日
Hi,
You can use Symbolic expressions as a workaround for such evaluations. Although, I was not able to get the answer in 'sqrt' format, but imaginary part comes out in terms of 'pi'.
>> sym(log(1-i))
ans =
390207173010335/1125899906842624 - (pi*1i)/4
Here's the link to the documentation,

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

質問済み:

2021 年 2 月 23 日

コメント済み:

2021 年 3 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by