Why emd function doesn't work in my code?

조회 수: 7 (최근 30일)
Komal
Komal 2022년 6월 18일
답변: prabhat kumar sharma 2024년 7월 23일
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
prabhat kumar sharma 2024년 7월 23일
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