Re: [R] Power Spectrum from STFT (e1071)?

From: Mike Marchywka <marchywka_at_hotmail.com>
Date: Fri, 13 May 2011 06:48:11 -0400

> Date: Tue, 10 May 2011 11:55:34 -0700
> From: ajf226_at_psu.edu
> To: r-help_at_r-project.org
> Subject: [R] Power Spectrum from STFT (e1071)?
>
> Hello.
>
> Does anyone know how to generate a power spectrum from the STFT function in
> package e1071? The output for this function supplies the Fourier
> coefficients, but I do not know how to relate these back to the power
> spectrum.
>
> Alternatively, if anyone is aware of other packages/functions that perform
> short time Fourier transforms, that would also be helpful.

What exactly are you trying to do? From what I can recall, quick look on wikipedia and I've done this in the past for audio envelope/carrier separation, the short-term modifier just means you need to window the input signal. I did just do something like this in R, to deconvolve histograms with an impulse response, and it is not hard to create your own window function and multiply with signal. Power spectrum  is just magnitude, but you may want to also invert and see that output is real (Re>> Im) to verify nothing went wrong in processing. Probably this returns complex numbers, I think you can use abs) or Re() and Im() on them and also str() but post some code and try "?fft" for example.

>
> Thanks.
>
                                               



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 13 May 2011 - 10:50:47 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 13 May 2011 - 11:00:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive