3
$\begingroup$

I have a seismic accelerogram. I tried to apply the Fourier Transform to interpolate function, but dosn't work. So, i applied the Fourier[signal,FourierParameters->{-1,-1}], when i Plot (ListLinePlot)

Abs[Fourier[signal,FourierParameters->{-1,-1}]]

Signal:

https://www.dropbox.com/s/tkag1h1tkbb34p8/elcentro.dat?dl=0

I obtained a Incorrect graphics (no sense ).

Signal

Fourier Transform Obtainded By Fourier[]

Can I solve It?

thanks in advance

$\endgroup$
6
  • $\begingroup$ I haven't looked at your data, but I think it must be 2d, that is, a list of lists. $\endgroup$
    – mikado
    Oct 16, 2016 at 11:02
  • $\begingroup$ Have you got time mixed in with the data? The input to Fourier should be a list of the data without the time coordinate. $\endgroup$
    – Hugh
    Oct 16, 2016 at 11:02
  • $\begingroup$ @hugh so I must pass to "Fourier[]" only time coloumn? If yes, how plot The diagram frequency/Abs[FT]? Thx $\endgroup$
    – plus91
    Oct 16, 2016 at 11:07
  • $\begingroup$ @mikado I must verify but i think it is a list with two coloumn (time and acc). I import it by signal=Import["elcentro.dat"] and Then plot it by " ListLinePlot[signal]. Thx $\endgroup$
    – plus91
    Oct 16, 2016 at 11:10
  • $\begingroup$ Just use the ordinates. I put some information on using Fourier here. $\endgroup$
    – Hugh
    Oct 16, 2016 at 11:12

1 Answer 1

2
$\begingroup$

Like already pointed out in the comments: only use the ordinate values.

fData=Abs[Fourier[data[[All,2]],FourierParameters->{-1,-1}]]^2;
fData=fData[[1;;Floor[Length[fData]/2]]];

With a little bit more code, we can visualize it very well:

SR=(Length[data]/data[[All,1]][[-1]]);
Frequencies=(Range[1,Length[fData]]-1)*SR/Length[data];
ListLinePlot[Transpose[{Frequencies,fData}],PlotRange->All,Frame->True,FrameLabel->{Style["Frequency",16],Style["Powerspectrum",16]},ImageSize->1200,AspectRatio->1/8]

The Powerspectrum

$\endgroup$
1
  • $\begingroup$ Julien Kluge, thx for your solution ;) $\endgroup$
    – plus91
    Oct 16, 2016 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.