frequency to time domain conversion

hi,
I have some data in text file, I want to read that data and convert the data from frequency to time domain. the data is like this
Frequency [Hz] Current(A)
1.000000000000E+07 2.500234034000E-06
1.018679245283E+07 2.546990258195E-06
1.074716981132E+07 2.687277097052E-06
1.149433962264E+07 2.874370653929E-06
1.242830188679E+07 3.108313963777E-06
1.336226415094E+07 3.342348535650E-06
I already tried the Wizard, load, fopen , fread, textscan,
suggestion please

5 Comments

... tried the Wizard, load, fopen , fread, textscan,...
And the problem specifically was/is??? Looks like a straightforward textread or import solution should work.
fn='yourfilename.txt';
[fr,cur]=textread(fn,'%f %f','headerlines',1); % separate variables
or
data=textread(fn,'','headerlines',1); % single array
thats perfect, now how I can convert to frequency data like this
t=1/fr
or i have to do
ifft
thanks again
Presuming you got frequency data from either a fft on a recorded time trace or downloaded from a frequency analyzer, your only way to reconstruct a time history is via the inverse transform. But, to do that and regenerate the actual time history you need the complex conjugate of the actual transform, not the PSD.
Walter gives a short tutorial here--
@dpb, I really can not understand whats going on, is there is no example that could show this
Any text on the FFT or tutorial on the internet. The problem is that if you have only the PSD of a real time signal you've lost the underlying phase data and therefore have no way of regenerating the original time history any longer. You just don't have enough information left on hand.
The math is such that to generate a real output from the IFFT the input must be complex conjugate symmetric and you have no imaginary component from which to build a meaningful conjugate as the PSD is the amplitude-only result of the FFT; the phase has been mushed out.

Sign in to comment.

Answers (0)

Products

Asked:

on 13 May 2014

Commented:

dpb
on 15 May 2014

Community Treasure Hunt

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

Start Hunting!