Graphing a complex exponential

16 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Walter Roberson
Walter Roberson il 2 Feb 2018
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 Commento
Walter Roberson
Walter Roberson il 3 Feb 2018
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'})

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Agriculture in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by