[Eeglablist] Problem with inverse transform

Cedric Cannard ccannard at protonmail.com
Sat Aug 5 19:33:47 PDT 2023


Dear Franzi,

I don’t know if it’s possible to convert back to time domain from time-frequency domain. However, you can convert back from frequency domain like this:
iChan = 1; % EEG channel of interest
ft = fft(EEG.data(iChan,:)); % frequency domain with FFT
EEG.data(iChan,:) = ifft(ft); % Inverse transform back to time domain

Cedric

On Thu, Aug 3, 2023 at 14:52, Richards, John via eeglablist <[eeglablist at sccn.ucsd.edu](mailto:On Thu, Aug 3, 2023 at 14:52, Richards, John via eeglablist <<a href=)> wrote:

> Try cwt and icwt in matlab. cwt is "continuous wavelet transform" and gives the weights for the time-frequency function; cwt without arguments produces the "scalogram". icwt takes the cfs and f from [cfs f]=cwt.. and can extract frequency-band inverse transform data. My understanding is that wavelet frequency decomposition has positive properties compared with fft and ifft, and over typical EEG/ERP bandpass filters.
>
> John
>
> ***********************************************
> John E. Richards
> Carolina Distinguished Professor
> Department of Psychology
> University of South Carolina
> Columbia, SC 29208
> Dept Phone: 803 777 2079
> Fax: 803 777 9558
> Email: richards-john at sc.edu
> https://urldefense.com/v3/__https://jerlab.sc.edu/__;!!Mih3wA!GCRN27ibXV6IUZ4D00BkUwDeA0mrsJqjqFjHsnMi0bdOtzJlSLiQDrq4lCn0kC9XA2pXGY0PDj8BMMeCe3Iet5OoYrgMsQ$
> ***********************************************
>
> -----Original Message-----
> From: eeglablist <eeglablist-bounces at sccn.ucsd.edu> On Behalf Of Makoto Miyakoshi via eeglablist
> Sent: Thursday, August 3, 2023 4:14 PM
> To: Franziska Kirsch <franziska.kirsch at ovgu.de>
> Cc: eeglablist at sccn.ucsd.edu
> Subject: Re: [Eeglablist] Problem with inverse transform
>
> Dear Franzi,
>
> I did not know there is such a thing as inverse short-term Frourier Transformation, but I can see it should work.
> First of all, you have to share the error message so that we can guess the cause of the problem better.
> That said, judging from your comment,
>
>> Also, I'm not sure if the input requires complex data or data already
> transformed to power.
>
> most likely you did not understand the required input type and your input was wrong. The input must be 3-D complex data. See this page. Note 'Input arguments' can be found AFTER 'Examples' (strange!)
> https://urldefense.com/v3/__https://www.mathworks.com/help/signal/ref/istft.html*mw_df6a90fa-0796-411d-ab9c-d86cc3c0edec_sep_mw_f4653206-42e2-4878-82ba-66875c98c86c__;Iw!!Mih3wA!H7QLYv7nSTdwJrG_4fGNP0eV4b4XW-NVNWLV872UQPC3mzT29zQNAnKNKSA54Svi0sLM59alPwfeIRPh0nYfPq0nHpw$
>
> Good luck!
>
> Makoto
>
> On Fri, Jul 28, 2023 at 8:30 PM Franziska Kirsch via eeglablist < eeglablist at sccn.ucsd.edu> wrote:
>
>> Dear List Members,
>>
>> currently I am trying to inverse transform data in time-frequency
>> space back to time domain. I have used the istft - function (inverse
>> short time Fourier transform) from Matlab, but it does not seem to
>> work. I keep getting error messages about problems with the input
>> data, even though it should be correct (as the function says ‚matrix
>> with time increasing across the columns and frequency increasing down
>> the rows‘). Also, I'm not sure if the input requires complex data or data already transformed to power.
>>
>> Another idea is to calculate it manually and multiply a complex sine
>> wave by the complex Fourier coefficient and sum the results.
>>
>> Any recommendations on how to achieve an inverse transform? Thank you
>> in advance for your help!
>>
>> Yours sincerely,
>> Franzi Kirsch
>>
>> _______________________________________________
>> Eeglablist page:
>> https://urldefense.com/v3/__http://sccn/__;!!Mih3wA!GCRN27ibXV6IUZ4D00BkUwDeA0mrsJqjqFjHsnMi0bdOtzJlSLiQDrq4lCn0kC9XA2pXGY0PDj8BMMeCe3Iet5OiQMY5-Q$ .
>> ucsd.edu%2Feeglab%2Feeglabmail.html&data=05%7C01%7CRICHARDS%40mailbox.
>> sc.edu%7C6d525c9698244d97744608db946a2774%7C4b2a4b19d135420e8bb2b1cd23
>> 8998cc%7C0%7C0%7C638266955878844005%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
>> 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%
>> 7C&sdata=3b1vbWuQs9CjX9055Ft6RbJg5EIDH%2FwMrhsD7RLvenA%3D&reserved=0
>> To unsubscribe, send an empty email to
>> eeglablist-unsubscribe at sccn.ucsd.edu
>> For digest mode, send an email with the subject "set digest mime" to
>> eeglablist-request at sccn.ucsd.edu
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu


More information about the eeglablist mailing list