Repeating a function for different values that involves imaginary numbers.

11 ビュー (過去 30 日間)
Gee
Gee 2024 年 2 月 24 日
編集済み: Voss 2024 年 2 月 24 日
I am working on getting the output for a function that includes the calculations of imaginary numbers. It works when I have
f=[1000:1000000]
w=2*pi*f
X=0.2/j*w,
However, when I takes Y=1/X, the calculation failsa and I get no output. Sorry if the question is too shallow as I just learning this tool recently.

採用された回答

Voss
Voss 2024 年 2 月 24 日
  5 件のコメント
Gee
Gee 2024 年 2 月 24 日
Thank you for the clarification. I now see the importance of clarity in using Matlab.
Voss
Voss 2024 年 2 月 24 日
編集済み: Voss 2024 年 2 月 24 日
You're welcome. Any other questions, let me know. Thanks!

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

その他の回答 (1 件)

Torsten
Torsten 2024 年 2 月 24 日
移動済み: Torsten 2024 年 2 月 24 日
X is a vector, not a scalar.
The elementwise division of 1 by a vector has to be coded as
1./X
instead of
1/X
  1 件のコメント
Gee
Gee 2024 年 2 月 24 日
Thank you for replying. The page you provided is very helpful.

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

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by