-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSortDataByTrial.m
96 lines (81 loc) · 4.53 KB
/
SortDataByTrial.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
89
90
91
92
93
94
95
96
%% Sort data by trial
%{
Fourteen total tests:
Grossman:
Horizontal = shake head horizontally
Vertical = shake head vertically
RIP = run in place
WIP = walk in place
StandOpen = standing still, eyes open
StandClosed = standing still, eyes closed
For the outdoor tests:
RGS = Run grass shoes
WGS = walk grass shoes
RCS = run concrete shoes
WCS = walk concrete shoes
RGB = run grass barefoot
WGB = walk grass barefoot
RCB = run concrete barefoot
WCB = walk concrete barefoot
This list is hand-made, and works only for our data.
%}
HorizontalShake = cellfun(@isempty, strfind(Data.Filename, 'Horizontal') ) == 0;
HorizontalShakeIndices = Indices(HorizontalShake > 0 );
HorizontalShakeLength = length( HorizontalShakeIndices );
VerticalShake = cellfun(@isempty, strfind(Data.Filename, 'Vertical') ) == 0;
VerticalShakeIndices = Indices( VerticalShake > 0 );
VerticalShakeLength = length( VerticalShakeIndices );
RunInPlace = cellfun(@isempty, strfind(Data.Filename, 'RIP') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'RunInPlace') ) == 0 ;
RunInPlaceIndices = Indices(RunInPlace > 0 );
RunInPlaceLength = length(RunInPlaceIndices);
WalkInPlace = cellfun(@isempty, strfind(Data.Filename, 'WIP') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'WalkInPlace') ) == 0 ;
WalkInPlaceIndices = Indices( WalkInPlace > 0 ) ;
WalkInPlaceLength = length(WalkInPlaceIndices);
StandOpen = cellfun(@isempty, strfind(Data.Filename, 'StandOpen' ) ) == 0;
StandOpenIndices = Indices( StandOpen > 0 ) ;
StandOpenLength = length(StandOpenIndices);
StandClosed = cellfun(@isempty, strfind(Data.Filename, 'StandClosed' ) ) == 0;
StandClosedIndices = Indices( StandClosed > 0 ) ;
StandClosedLength = length(StandClosedIndices);
RunGrassShoes = cellfun(@isempty, strfind(Data.Filename, 'RGS') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'RunShoesGrass') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'RUNSHOESGRASS') ) == 0;
RunGrassShoesIndices = Indices(RunGrassShoes > 0 );
RunGrassShoesLength = length(RunGrassShoesIndices);
WalkGrassShoes = cellfun(@isempty, strfind(Data.Filename, 'WGS') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'WalkShoesGrass') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'WALKSHOESGRASS') ) == 0;
WalkGrassShoesIndices = Indices( WalkGrassShoes > 0 ) ;
WalkGrassShoesLength = length(WalkGrassShoesIndices);
RunConcreteShoes = cellfun(@isempty, strfind(Data.Filename, 'RCS') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'RunShoesConcrete') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'RUNSHOESCONCRETE') ) == 0;
RunConcreteShoesIndices = Indices(RunConcreteShoes > 0 );
RunConcreteShoesLength = length(RunConcreteShoesIndices);
WalkConcreteShoes = cellfun(@isempty, strfind(Data.Filename, 'WCS') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'WalkShoesConcrete') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'WALKSHOESCONCRETE') ) == 0;
WalkConcreteShoesIndices = Indices(WalkConcreteShoes > 0 ) ;
WalkConcreteShoesLength = length(WalkConcreteShoesIndices);
RunGrassBarefoot = cellfun(@isempty, strfind(Data.Filename, 'RGB') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'RunBareGrass') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'RUNBAREGRASS') ) == 0;
RunGrassBarefootIndices = Indices(RunGrassBarefoot > 0 );
RunGrassBarefootLength = length(RunGrassBarefootIndices);
WalkGrassBarefoot = cellfun(@isempty, strfind(Data.Filename, 'WGB') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'WalkBareGrass') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'WALKBAREGRASS') ) == 0;
WalkGrassBarefootIndices = Indices( WalkGrassBarefoot > 0 ) ;
WalkGrassBarefootLength = length(WalkGrassBarefootIndices);
RunConcreteBarefoot = cellfun(@isempty, strfind(Data.Filename, 'RCB')) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'RunBareConcrete') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'RUNBARECONCRETE') ) == 0;
RunConcreteBarefootIndices = Indices( RunConcreteBarefoot > 0 ) ;
RunConcreteBarefootLength = length(RunConcreteBarefootIndices ) ;
WalkConcreteBarefoot = cellfun(@isempty, strfind(Data.Filename, 'WCB'))== 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'WalkConcreteBarefoot') ) == 0 + ...
cellfun(@isempty, strfind(Data.Filename, 'WALKCONCRETEBAREFOOT') ) == 0;
WalkConcreteBarefootIndices = Indices( WalkConcreteBarefoot ) ;
WalkConcreteBarefootLength = length(WalkConcreteBarefootIndices);