Calculating Coherence in an Matrix

4 views (last 30 days)
This may be a simple quesiton, but I have been working with fieldtrip and have had difficulty with the freqanalysis function since I am processing data outside of fieldtrip synchronously.
I have a dataset that is 259 X 683000. Where each row coincides with a specific electrode on the body.
I was wondering if there was anyway to calculate coherence between the first 256 (1:256) electrodes and the final 3 (257:259).

Accepted Answer

KALYAN ACHARJYA on 18 Dec 2020
I am trying to answer using the following code
% Sample Array Data
data_set=rand(259,1000); %I intentionally changed the column number
%First 256 Electrodes
%Last 3 Electrodes
% Vertical Concatenation
% Next Mutual coherence of the matrix
The custom function mutual_coherence avalible here (please verify). You may look on other MATLAB inbuilt function, like corr,norm etc. Once you select a very large array size, a problem may arise, please refer to this answer.

More Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!