Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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(n)= 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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top