-
Notifications
You must be signed in to change notification settings - Fork 0
/
datasegments_schizop.asv
82 lines (71 loc) · 1.67 KB
/
datasegments_schizop.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
%%
clc
clear
cd("C:\Users\HP\Desktop\harit\multiscale_entropy")
fs=250;
segLen=25;
k=1;
for j=1:14
if(j<10)
subject=strcat('s0',num2str(j),'.edf');
else
subject=strcat('s',num2str(j),'.edf');
end
[hdr, full_eeg_cont] = edfread((subject));
SegNum=size(full_eeg_cont,2)/(fs*segLen);
for i=1:SegNum
Class_Helthy{k,1}=full_eeg_cont(:,segLen*fs*(i-1)+1:segLen*fs*i);
k=k+1;
end
end
%%
clc
cd("C:\Users\HP\Desktop\harit\multiscale_entropy\data2")
no_of_modes = 10;
dur=segLen;
for i=334:k-1
x=Class_Helthy{i,1};
tic
clear u u_hat omega u1
[u, u_hat, omega] = MVMD_ver1(x, 1000, 0, no_of_modes, 0, 0, 1e-7);
toc
FileName=strcat('u_sz_',num2str(i),'.mat')
save(FileName,'u')
clear x FileName
end
%%
u1(:,:,:)=permute(u,[3 1 2]);
imf_ch1(:,:)=u1(1,1:no_of_modes,:);
imf_ch2(:,:)=u1(2,1:no_of_modes,:);
imf_ch3(:,:)=u1(3,1:no_of_modes,:);
imf_ch4(:,:)=u1(4,1:no_of_modes,:);
imf_ch5(:,:)=u1(5,1:no_of_modes,:);
imf_ch6(:,:)=u1(6,1:no_of_modes,:);
imf_ch7(:,:)=u1(7,1:no_of_modes,:);
imf_ch8(:,:)=u1(8,1:no_of_modes,:);
imf_ch9(:,:)=u1(9,1:no_of_modes,:);
imf_ch10(:,:)=u1(10,1:no_of_modes,:);
imf_ch11(:,:)=u1(11,1:no_of_modes,:);
imf_ch12(:,:)=u1(12,1:no_of_modes,:);
imf_ch13(:,:)=u1(13,1:no_of_modes,:);
imf_ch14(:,:)=u1(14,1:no_of_modes,:);
imf_ch15(:,:)=u1(15,1:no_of_modes,:);
imf_ch16(:,:)=u1(16,1:no_of_modes,:);
imf_ch17(:,:)=u1(17,1:no_of_modes,:);
imf_ch18(:,:)=u1(18,1:no_of_modes,:);
imf_ch19(:,:)=u1(19,1:no_of_modes,:);
%%
for i1=1:no_of_modes
subplot(10,2,i1)
plot(abs(fft(hilbert(imf_ch2(i1,:)))))
end
%%
[m_1,n_1]=size(imf_ch1);
scale=3;
cimf1=sum(imf_ch1(1,:)+imf_ch1(2,:)+imf_ch1(2,:))
%%
x1=zeros(1,n_1);
for i2=0:no_of_modes-1
x1=x1+imf_ch1(m_1-i2,:);
x2(i2+1,:)=x1;
end