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 Exchange에서 Data 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