How can I solve this problem in the CSP feature extraction algorithm for EEG signal?
2 次查看(过去 30 天)
显示 更早的评论
Dataset description:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1554587/image.png)
Code:
% Calculate the covariance matrices for each class
cov_matrices = cell(1, 2);
disp(unique(labels));
disp(size(epochs));
for i = 1:2
if any(labels == i)
class_epochs = epochs(:, :, labels == i);
cov_matrices{i} = cov(class_epochs');
else
disp(['No data for class ', num2str(i)]);
end
end
Error:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1554582/image.png)
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 EEG/MEG/ECoG 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!