Why emd function doesn't work in my code?

1 次查看(过去 30 天)
clc;
clear;
load s1.mat;
load HEOG.mat;
s = s1.train;
y0 = datasample(s,1);
y = y0(1:5000);
g = heog_1;
g = g(1:5000);
x = y+g;
% first 5000 samples
figure; p=plot(y);
hold on;
plot(g);
plot(x,'black');
hold off;
legend('EEG Signal','EOG Signal', 'EEG signal Containing EOG');
title('EEG Signal');
[imf,residual,info] = emd(y0,'Interpolation','pchip'); %%There is an error
figure;hht(imf,5000)
  1 个评论
Jan
Jan 2022-6-19
Whenever you mention an error in the forum, attach a copy of the complete error message. It is much easier to fix an error than to guess, what the error is.

请先登录,再进行评论。

回答(1 个)

prabhat kumar sharma
Hi Komal,
I suggest you share the complete error message for better diagnosis. Based on my observations, you can check the following steps:
1.Ensure the Signal Processing Toolbox is installed:
ver signal
2. Check that y0 is a numeric vector:
disp(class(y0));
disp(size(y0));
3. Verify the correct use of emd function:
[imf, residual, info] = emd(y0, 'Interpolation', 'pchip');
If you still encounter an error, please provide the complete error message for further assistance.

类别

Help CenterFile Exchange 中查找有关 EEG/MEG/ECoG 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by