Info

This question is closed. Reopen it to edit or answer.

Split vector A into smaller vectors based on vector B

2 views (last 30 days)
I have two vectors of same lenght. Vector A contains angle data, and vector B contains gait phase (1=stand; 2=swing).
I want to split vector A into smallers vector for each individual gait phase.
My data is as follows:
Vector A Vector B
1.2 1
1.3 1
1.4 1
1.5 2
1.6 2
1.7 2
1.8 2
1.9 2
1.10 2
1.11 1
1.12 1
1.13 1
1.14 1
Then I want to split A into...
Vector C Vector D Vector E
1.2 1.5 1.11
1.3 1.6 1.12
1.4 1.7 1.13
1.8 1.14
1.9
1.10
Thank you!

Answers (0)

This question is closed.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!