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.

IMPULSE TRAIN GENERATION IN MATLAB...

Status
Not open for further replies.

Nosheen

Member level 1
Joined
Aug 2, 2007
Messages
33
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,557
impulse train matlab

an anyone help me generate an IMPUSLE COMB(impulse train) both in time and freq domain....

let the sampling period be Ts=0.00025 or Fs=4000 , next 2Fs,3Fs and so on...
kindly help me plot this impulse train and its FFT in MATLAB

thanx in advance
 

impulse train in matlab

>> Ts = 0.00025;
>> Len = 16;
>> impulseTrain = ones(1, Len);
>> n = 0:Ts:Ts*(Len-1);
>> stem(n, impulseTrain);
>> xlabel('n ----->')
 

    Nosheen

    Points: 2
    Helpful Answer Positive Rating
matlab impulse train

>> freq = fft(impulseTrain, Len);
>> stem([(0:Len-1)/(Len*Ts)], abs(freq))

it shows a peak at 0 frequency, that result is correct.
what happens is the fft just gives u the first window, its made to give only the non repeating part...
actually every discrete signal is a periodic in frequency domain.
so the actual fft that u obtained(which is a spike delta function),,, repeat it to get ur actual frequency domain(which is a impulse train again, repeated impulses, coz FD is periodic)

mon
 

    Nosheen

    Points: 2
    Helpful Answer Positive Rating
delta train matlab

yes, u r correct..i am having a peak at zero freq and all zeroz else where...
the problem iz that i want to see the plot of FFT of the impulse train as
--> the first peak at zero freq
--> 2nd impulse at Fs(or 1/Ts)
--> third at 2Fs(1/2Ts) and so on

i want the FFT to look like this in MATLAB... IZ IT POSSIBLE???
 

plot impulses train

>> freq = fft(impulseTrain, Len);

>> freqRepeated = repmat(freq, 1, 10);
>> stem([(0:Len*10-1)/(Len*Ts)], abs(freqRepeated))

this method just shows 10 repetetions of FFT of impulse train...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top