Diff of /Feature Extraction/app2.m [000000] .. [db7908]

Switch to unified view

a b/Feature Extraction/app2.m
1
% Extract Autoregression (AR) Feature
2
close all; clear; clc;
3
4
load dataset_BCIcomp1.mat
5
Y=y_train;
6
7
% Range is 0 to 9 sec
8
startS=0;
9
endS=9;
10
wStep=1;
11
wRange=9;
12
13
AROrder=5;
14
X=extractAR(x_train,AROrder,startS,endS,wStep,wRange);
15
T=extractAR(x_test,AROrder,startS,endS,wStep,wRange);
16
save dataAR.mat X Y T
17
18
19
color_L = [0 102 255] ./ 255;
20
color_R = [255, 0, 102] ./ 255;
21
22
pos = find(Y==1);
23
plot(X(pos,1),X(pos,2),'x','Color',color_L,'LineWidth',2);
24
25
hold on
26
pos = find(Y==2);
27
plot(X(pos,1),X(pos,2),'o','Color',color_R,'LineWidth',2);
28
29
legend('Left Hand','Right Hand')
30
xlabel('C3','fontweight','bold')
31
ylabel('C4','fontweight','bold')