-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.m
44 lines (31 loc) · 795 Bytes
/
main.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
clear
close all
addpath('topology')
%% Parameters
datasetfolder = 'D:\Research\datasets\BCICIV\';
subject = 'b'; % from a to g
MaxBest = 10;
FitnessFunction='Fisher'; % Corr, Fisher, Combined
Run_no=1; % Number of independent runs
Particles_no=100; % Number of particles
Max_iteration=50; % Maximum number of iterations
%%
dataset = [datasetfolder 'BCICIV_calib_ds1' subject '.mat']
load(dataset)
Segments = EEG_Split(cnt, mrk)
Class = mrk.y';
%%
sample = Segments{1};
sample2 = Segments{2};
%%
corr2(sample(:,1),sample(:,2))
%%
corr2(double(cnt(:,1)),double(cnt(:,2)))
%%
% figure
% PlotEEG_System(59)
% title('BCI IVa 59 EEG System')
%%
fisher_criteria(sample(:,2),sample(:,1))
%% Run Equilibrium Optimizer
RunEquilibrium