Info
This question is closed. Reopen it to edit or answer.
How can I obtain another vector for a known vector, such that the elements of the new vector are the time that the element at the corresponding position in the known vector appears in it, without using loops?
1 view (last 30 days)
Show older comments
For example, if A=[1 2 3 4 5 6], then B=[1 1 1 1 1 1]; if A=[1 1 2 2 3 3], then B=[1 2 1 2 1 2]; if A=[1 1 1 3 4 3], then B=[1 2 3 1 1 2]; ...and so on. I'd like to fulfil this without using loops.
0 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!