how to create a complex number: j(number)

i want create complex number in my m file code how i can do this : a= j(number)

1 件のコメント

Jiro Doke
Jiro Doke 2012 年 2 月 19 日
Changing the title to make it more descriptive.

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

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 2 月 19 日

0 投票

a = 3 + 5j;
or
a = 3 + 5*j;
or
a = complex(3,5);
behnam
behnam 2012 年 2 月 19 日

0 投票

for example :
a=input('enter a');
t=j(a/20);
this is true ?
or t=i(a/20);

1 件のコメント

Matt Kindig
Matt Kindig 2012 年 2 月 19 日
Neither is correct. Both j and i are constants (sqrt(-1)), not functions, so that are not called like this. Instead:
a=input('enter a');
t=j*(a/20)

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

カテゴリ

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

質問済み:

2012 年 2 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by