How to create a vector for multiple frames of data in rows and columns?
2 views (last 30 days)
Show older comments
I have data from a walking data collection. Each marker has two columns of data and 134 rows of data. I need to create a vector that corresponds to the time of each frame starting at 0. I am assuming this would need to be done with some of loop. If anyone could help that would be great.
Answers (1)
Jan
on 27 Feb 2023
The actual question is: "I need to create a vector that corresponds to the time of each frame starting at 0"
What about:
t = linspace(0, 133/120, 134) % Yes: 133/120, not 134/120
2 Comments
Jan
on 28 Feb 2023
Expand:
thigh_vector = atand((RGRT(2)-RLCO(2))/(RGRT(1)-RLCO(1)));
to the complete columns:
thigh_vector = atand((RGRT(:, 2) - RLCO(:, 2)) ./ (RGRT(:, 1) - RLCO(:, 1)));
You need the elementwise division ./ instead of the array division / here.
See Also
Categories
Find more on Matrix Indexing 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!