calculate DTFT of an analog signal

Status
Not open for further replies.

oualkadi

Member level 3
Joined
Oct 29, 2005
Messages
57
Helped
3
Reputation
12
Reaction score
1
Trophy points
1,288
Activity points
1,563
how to calculate DTFT of an analog signal using matlab?
 

Be clear that in MATLAB you can do only FFT which is a efficient form of DTFT.

now lets take a analog signal

x= A sin (2*pi*f*t);

( in a PC nothing is analog)...

so lets make it Discrete ... and the sampling freq fs = ( 1/Ts)

lets and fs > 2*fm .. fm = max freq in our input signal

lets take Ts=0.1 for a period of 1 sec




Code:
Ts=0.1;
T= 0:Ts:1;
f=3; %hz
x= 10.*sin(2*pi*f*T);
plot(T,x);

freq= fft(x);   %takeing   FFT for the signal

plot(fftshift(abs(freq)));



this must be a simple matlab code but i dont know if the syntax are correct

hope it helped you
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…