Info
此问题已关闭。 请重新打开它进行编辑或回答。
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 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!