Graphing a complex exponential

조회 수: 16 (최근 30일)
justin stephens
justin stephens 2018년 2월 2일
댓글: Walter Roberson 2018년 2월 3일
so i am trying to graph this complex exponential and i keep getting errors in the portion of the code for the exponential(says possibly missing ')' ). the function is
e^((i*pi)/6t)
where t is my time vector t= 0:0.1:10;
Would some mind lending a hand.

채택된 답변

Walter Roberson
Walter Roberson 2018년 2월 2일
exp(1i*pi/6./t)
or
exp(1i*pi/6.*t)
depending on whether the t is intended to be in the numerator or denominator
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 2월 3일
t = 0:0.1:10;
f1 = exp(1i*pi/6./t);
f2 = exp(1i*pi/6.*t);
plot(t, real(f1), 'b^', t, imag(f1), 'bv', t, real(f2), 'g^', t, imag(f2), 'gv');
legend({'./t real', './t imag', '.*t real', '.*t imag'})

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Agriculture에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by