04-03-2019 12:55 PM
Hi community,
I'm trying to generate a time-domain signal "f(t)" from a given power density spectrum (PDS) "S(f)" - code snippet below.
My steps are as follows:
The problem I'm having is when I try to take the IFT of the PDS I'm getting "NaN" for all of my values. I've also tried implementing some of the methods described at this link but I get the same problem. I'm hoping that I'm making a silly mistake given that my knowledge of PSD and fourier transforms is lacking.
Any help is greatly appreciated,
AVD
Solved! Go to Solution.
04-03-2019 01:30 PM
I've just solved my own question thanks to some more searching on the forums so I thought I'd post here in case it can help anyone else.
The IFFT wasn't working because my generated PSD input data included a few NaNs (it turns out the Fourier functions don't like NaNs). After removing them my code works. Solution courtesy of this forum post.
Thanks forums