MATLAB Answers

How to plot both real and imaginary part of complex exponential?

32 views (last 30 days)
Duy Dang
Duy Dang on 27 Oct 2020 at 18:09
Answered: Star Strider on 27 Oct 2020 at 19:23
Hi,
I dont know how to plot this, since there is imaginary unit in the function, please help
x(t) = t^2 + j2πt, 0 ≤ t ≤ 10 , plot the approximate signals using 5 terms of the complex exponential form. This is what is got. Not sure if it right?
clc;
clear all;
close all;
t0 = 0;
T = 10;
w = 2*pi/T
syms t
x = t^2 +(j*2*pi*t)
k = -2:2 %5 terms
a = (1/T)*int(x*exp(-1j*k*w*t),t,t0,t0+T); %%complex exponential

  3 Comments

Walter Roberson
Walter Roberson on 27 Oct 2020 at 18:17
real() imag() abs()
How is k related to the rest of the question? It is not t values as you have negative k but t is nonnegative
Duy Dang
Duy Dang on 27 Oct 2020 at 18:19
k is the 5 terms that the question asked.I know use real, img in this problem but I dont know how to proper use it because I always get error. like how to set it up

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by