Why dot indexing is not supported for variables of this type using EMD method in MATLAB R2019a version ? What can I do?

 Akzeptierte Antwort

It seems IMF is not a sturcutre. Check
class(IMF)
If it is double. Try
max(IMF)

4 Kommentare

Dear experts,
Here is my code with dataset . I try to follow your instruction but couldn't work at R2019a MATLAB.Please give me an idea or solution of this.
Code:
%%
clc
clear
close all;
load B02T.mat;
fs=250;
% t = 0.004:1/fs:1;
eeg1 = data{1,1}.X;
channel_1= eeg1(:,1);
ch_1=channel_1;
figure;
subplot(2,1,1);
plot(ch_1);
xlabel('Time (s)');
ylabel('Amplitude (µV)');
legend('ch1');
title("Plot channel "+1+ " for Structure 1X1");
hold on;
grid on;
eeg_signal = eeg1(1:2000); % first 2000 samples
subplot(2,1,2);
plot(eeg_signal,'black');
hold on;
grid on;
xlabel('Time (s)');
ylabel('Amplitude (µV)');
legend('EEG Signal');
title('Contaminated EEG Signal');
%%
[IMF, residual, info] = emd(eeg_signal);
imf_count = max(info.NumIMF);
figure;
for i=1:imf_count
subplot(6,2,i)
plot(IMF(:,i))
title("IMF"+i);
end
subplot(6,2,imf_count+1)
plot(residual)
title("Residue");
You would need,
imf_count = max(info.numIMF);
However, since you use the value to loop over columns of the array IMF, it would make more sense to instead use
imf_count = size(IMF,2);
Dear sir,
This problem is remain at still now. Can you give any more idea ?
For some reason it must have returned [] for info

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Produkte

Version

R2019a

Gefragt:

am 23 Nov. 2023

Kommentiert:

am 23 Nov. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by