-
Notifications
You must be signed in to change notification settings - Fork 0
/
total.m
88 lines (79 loc) · 1.62 KB
/
total.m
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
83
84
85
86
87
88
%Calculation of epoc energy of 100 dataset in one allepoc array
function[ allepoc ] = total(s,a)
allepoc=zeros(1,1000);
tot=0;
for i=1:1:100
ee=zeros(1,400);
ee=energy(s(i),i,a);
for j=1:10
tot=tot+1;
allepoc(tot)=ee(j);
end
end
mn=allepoc(1);
mx=allepoc(1);
for i=1:1000
if( mn>allepoc(i))
mn=allepoc(i);
end
if(mx<allepoc(i))
mx=allepoc(i);
end
end
mx=round(mx);
mn=round(mn);
ff=round(((mx-mn)/1000));
prob=zeros(1,ff);
cnt=0;
for i=mn:1000:mx
cnt=cnt+1;
temp=0;
for j=1:1000
if(allepoc(j)>i & a==5)
temp=temp+1;
end
if(allepoc(j)<i && a~=5)
temp=temp+1;
end
end
temp=temp/1000;
prob(cnt)=temp;
ff=i;
end
t=mn:1000:(ff);
if(a==1)
figure(6);
plot(t,prob,'-.x');
title('Healthy State(Eyes Open)');
xlabel('Data Points') % x-axis label
ylabel('Probability') % y-axis label
end
if(a==2)
figure(7);
plot(t,prob,'-.x');
title('Healthy State(Eyes Closed)');
xlabel('Data Points') % x-axis label
ylabel('Probability') % y-axis label
end
if(a==3)
figure(8);
plot(t,prob,'-.x');
title('Inter Ictal State(epileptic focus)');
xlabel('Data Points') % x-axis label
ylabel('Probability') % y-axis label
end
if(a==4)
figure(9);
plot(t,prob,'-.x');
title('Inter Ictal State(Hipocam. region)');
xlabel('Data Points') % x-axis label
ylabel('Probability') % y-axis label
end
if(a==5)
figure(10);
plot(t,prob,'-.x');
title('Ictal State');
xlabel('Data Points') % x-axis label
ylabel('Probability') % y-axis label
end
end