Calculating Coherence in an Matrix
14 次查看(过去 30 天)
显示 更早的评论
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).
Regards,
J
0 个评论
采纳的回答
KALYAN ACHARJYA
2020-12-18
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
req_data1=data_set(1:256,:);
%Last 3 Electrodes
req_data2=data_set(257:259,:);
% Vertical Concatenation
result_data=[req_data1;req_data2];
% Next Mutual coherence of the matrix
coh_data=mutual_coherence(result_data)
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.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Digital Filter Analysis 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!