Filter löschen
Filter löschen

how to create a complex number: j(number)

2 Ansichten (letzte 30 Tage)
behnam
behnam am 19 Feb. 2012
i want create complex number in my m file code how i can do this : a= j(number)
  1 Kommentar
Jiro Doke
Jiro Doke am 19 Feb. 2012
Changing the title to make it more descriptive.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Walter Roberson
Walter Roberson am 19 Feb. 2012
a = 3 + 5j;
or
a = 3 + 5*j;
or
a = complex(3,5);

behnam
behnam am 19 Feb. 2012
for example :
a=input('enter a');
t=j(a/20);
this is true ?
or t=i(a/20);
  1 Kommentar
Matt Kindig
Matt Kindig am 19 Feb. 2012
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)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by