frequency to time domain conversion
Show older comments
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
dpb
on 13 May 2014
... 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
Muhammad Ali Qadar
on 13 May 2014
dpb
on 13 May 2014
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--
Muhammad Ali Qadar
on 15 May 2014
dpb
on 15 May 2014
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.
Answers (0)
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!