필터 지우기
필터 지우기

how to create a complex number: j(number)

조회 수: 2 (최근 30일)
behnam
behnam 2012년 2월 19일
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일
a = 3 + 5j;
or
a = 3 + 5*j;
or
a = complex(3,5);

behnam
behnam 2012년 2월 19일
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)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by