Borrar filtros
Borrar filtros

Why emd function doesn't work in my code?

4 visualizaciones (últimos 30 días)
Komal
Komal el 18 de Jun. de 2022
Respondida: prabhat kumar sharma el 23 de Jul. de 2024
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 comentario
Jan
Jan el 19 de Jun. de 2022
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.

Iniciar sesión para comentar.

Respuestas (1)

prabhat kumar sharma
prabhat kumar sharma el 23 de Jul. de 2024
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.

Categorías

Más información sobre EEG/MEG/ECoG en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by