-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIImatToCsv .m
29 lines (28 loc) · 882 Bytes
/
IImatToCsv .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
clear all
clc
args = ["run", "trial", "sample", "signal", "TargetCode", "ResultCode", "StimulusTime", "Feedback", "IntertrialInterval", "Active", "SourceTime", "RunActive", "Recording", "IntCompute", "Running"];
subjects = ["AA", "BB", "CC"];
sessions = [1:10];
for i=1:3
for j=1:10
path = '/home/xn3cr0nx/Scrivania/Datasets/Datasets - BCI Competitions + JKHH/Competition II/II_IIa/';
subject = subjects(i);
session = num2str(sessions(j));
if(session == '10')
pre = '0';
else
pre = '00';
end
ext = '.mat';
stream = strcat(path, subject, pre, session, ext);
subjsec = strcat(subject, pre, session);
data = load(stream)
path = '/home/xn3cr0nx/Scrivania/Datasets/csv/CompetitionII/';
ext = '.csv';
for k=1:15
write = strcat(path, subjsec, '/', args(k), ext)
object = strcat('data.', args(k));
csvwrite(write, eval(object))
end
end
end