Hello every1..

Does any1 know how to generate a unit-strength impulse train using Matlab? i have been trying hard and still cannot get it and i forcefully plot out the impulse train using "stem" function.

The Matlab command 'pulsetran' is your best bet. Check this out:

% Set up the pulses
TrainLength   = PulseWidth + PulsePeriod(NumPulses - 1);
Spacing       = 0 : PulsePeriod : TrainLength;
SampleTimes = 0 : 1/SampleRate: TrainLength;
PulseTrain     = pulstran(SampleTimes , Spacing ,'rectpuls' , PulseWidth);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.