I’d like to export the power spectra that I generated from performing NxN magnitude-squared coherence as either CSVs, .XLSX, or .MAT files, for further plotting and analyses in MatLab.
Is there a way to export–ideally, batch-export–these spectra? Using the “File → Export to File” process in the pipeline editor does not produce the files I’m looking for (it exports time series data for the selected channels, not coherence spectra).
Hi @MPorter, connectivity files are 4D (nSignalsA, nSignalsB, nTime, nFreq), as such the dimensions have to be reduced to 2D before saving in tabular formats.
One way to do so, would be to:
Load the contents of the coherence .mat file
Get the coherence spectra for each pair of signals
My apologies for the delayed reply. Thanks so much for the code! This worked perfectly for individual MSCOH files. I wrote a slightly changed version to batch-export all within a category.