-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexport_csv.m
More file actions
53 lines (43 loc) · 1.2 KB
/
export_csv.m
File metadata and controls
53 lines (43 loc) · 1.2 KB
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
%
% loop through permuted rms array for
% - columns: subjects
% - rows: reps
%
% loop for:
% - time (pre, mid, post)
% - emg (1: VL 2: VM)
% - phase (C1-C2 and C3-C4)
% - set (1,2)
% - load (old,new)
%
% export to csv files
%
% set export directory
exportdir = "export/";
% permute rms of the format specified in import_csv
prms = permute (rms,[1,7,2,3,4,5,6]);
s_time= cellstr(["pre"; "mid"; "post"] );
s_emg = cellstr(["VL"; "VM"]);
s_phase = cellstr(["con"; "ecc"]);
s_load = cellstr(["old"; "new"]);
s_set = cellstr(["set1"; "set2"]);
for time = 1:3
for emg = 1:2
for phase = 1:2
for load = 1:2
for set = 1:2
filename = cstrcat(
exportdir,
"DD_men_",
char(s_time(time)),"_",
char(s_emg(emg)),"_",
char(s_phase(phase)),"_",
char(s_load(load)),"_",
char(s_set(set)),
".csv");
csvwrite(filename, prms(:,2:11,time,phase,emg,load,set));
end
end
end
end
end