Jump to content
Debdatta Sen

Magnitude & Phase output for FFT Function with Windowing

Recommended Posts

Hi all,

I have a time domain curve which I would like to convert into frequency domain.

By doing so I would like to obtain the magnitude and phase output from the curve. 
I need the Windowing function as well. Something like what fft hanning does in HyperGraph.
Is there a similar function in Compose?
The output I need should have both Magnitude and Phase components, something like this:


Share this post

Link to post
Share on other sites

Hello Debdatta,


you can use the user defined function (attached to this reply) with this syntax:


[AmpFFT,PhFFT,f] = FFTeval(s,Fs);


s: your signal values

Fs: sampling frequency

AmpFFT: apmlitude of the single sided spectrum

PhFFT: Phase of the single sided spectrum

f: frquency vector


you can then plot your results:







Of course you can also apply windows to your signal. There are many built windows ready to be used.

Your script will be:


w = hann(numel(s),'periodic');  %window

s = s .* w;  % windowing 

[AmpFFT,PhFFT,f] = FFTeval(s,Fs);


Other windows you can use:  hamming, kaiser, blackman... (just look inside the SignalProcessing library)


Hope it helps,






Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...