Find min/max values for multiple vectors
Show older comments
I have data that consists of 29000 data points, the data points represent knee flexion and extension while walking. I want to identify the range of knee flexion/extension for each step so would like to set up a code that will identify the max (peak knee flexion) and the min (essentially, the extreme of knee extension) and place them in columns so that I am able to mathematically determine the full range of motion. I have attached a small section of my data. Any help would be greatly appreciated.
Thank you,
KTATC
1.896891
1.906645
1.954969
2.017917
2.05585
2.026289
1.955361
1.86264
1.753541
1.651546
1.555886
1.434179
1.288468
1.099483
0.819409
0.414074
0.148248
0.525737
1.196841
1.94507
2.78589
3.716875
4.741009
5.88021
7.076109
8.230326
9.450791
10.936149
12.629765
14.395601
16.268884
18.356668
20.868518
23.78841
26.905872
30.152426
33.538209
36.958715
40.204742
43.213892
46.083349
48.813633
51.230342
53.17896
54.655308
55.696776
56.368171
56.78482
56.858641
56.517176
55.853492
54.819166
53.379501
51.595998
49.46196
47.008489
44.246653
41.173463
37.798069
34.202303
30.482646
26.800916
23.281601
19.81948
16.298334
12.786125
9.531466
6.522667
3.717017
1.303302
0.558666
1.40926
1.744807
1.383369
0.615887
0.526611
1.856527
3.167393
3.48183
2.653554
1.688529
1.820048
3.239606
5.196485
6.914517
8.316931
9.252989
9.275997
8.446561
7.208222
5.901303
4.92285
4.578578
4.748885
4.969603
4.880134
4.641839
4.374502
3.898061
3.308544
2.646962
1.972139
1.321713
0.687884
0.201645
0.162774
0.502434
0.822817
1.016835
1.138862
1.24153
1.334558
1.430215
1.48632
1.455194
1.358422
1.247557
1.108878
0.996499
0.901696
0.771448
0.629032
0.469211
0.215851
0.175029
0.641086
1.31688
2.1296
3.065699
4.160619
5.364495
6.668968
7.961354
9.201787
10.660482
12.307979
13.843011
15.39884
17.25659
19.433607
21.917437
24.704024
27.751515
31.090369
34.626633
38.131851
41.342198
44.176488
46.894787
49.527243
51.878779
53.700516
54.983319
55.826943
56.315017
56.557513
56.429544
56.010607
55.325851
54.300641
52.894947
51.113024
49.032677
46.646148
43.950462
40.9241
37.663488
34.285807
30.846671
27.337066
23.81088
20.261188
16.663554
13.064789
9.595202
6.415074
3.471567
1.064811
0.905657
2.087995
2.551736
2.315807
1.519399
0.539398
1.003327
2.245342
2.515882
1.620003
0.700727
0.975712
2.428847
4.398375
6.193811
7.564108
8.296403
8.054285
7.118903
6.090608
5.191819
4.496392
4 Comments
Honglei Chen
on 29 Jun 2012
It's not clear to me what multiple vectors are. Is each row a vector, or the whole 29000 is a vector? Do you have multiple 29000-point data vectors?
Ryan
on 29 Jun 2012
research or a class?
Walter Roberson
on 29 Jun 2012
I think it means the peaks of the vector represent the extreme in one case, and the troughs represent the extreme in the other case.
Kathy
on 29 Jun 2012
Accepted Answer
More Answers (1)
Walter Roberson
on 29 Jun 2012
0 votes
Do peak detection. Then take the negative of the data and do peak detection on that in order to find the locations of the troughs.
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!