How to derive the time axis for the ifft of an oscillating pulse?

3 views (last 30 days)
Hello, I have an oscillating pulse in the frequency domain that I would like to ifft and find the time signal. My signal looks like:
PulseFrequencyPicture.jpg
And comes from the following code:
sampleRate = 1000;
freq = 500 : (1/sampleRate) : 1500;
intensityFreq = exp(-((freq-1000).^2));
signalFreq = sqrt(intensityFreq).*exp(-1i*10*(freq-1000));
plot(freq,signalFreq)
When I ifft, it doens't automatically produce the time axis, and also shows a similar oscillating pulse (in time) whose oscillations depends on the frequency range I used in the above code. For example, when:
freq = 500 : (1/sampleRate) : 1500;
is used (as in the code shown above), the ifft looks like:
PulseTimePictureHigh.jpg
While when:
freq = 980 : (1/sampleRate) : 1020;
Is used instead, the ifft looks like:
PulseTimePictureLow.jpg
This makes no sense to me, since the frequency range shouldn't matter since signalFreq goes to 0 around these points anyway. Why does the altered frequency range affect the oscillations in the ifft so much? And how do I obtain the valid time axis for my output?
Any help is appreciated. If my explanation isn't clear I'll be happy to provide more detail.

Answers (0)

Tags

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!