How to Speedup conditional vector elements replacement?
古いコメントを表示
Dear,
a is a vector its values correspond to the number of times to repeat the
corresponding number drawn from the vector b. following this rule the result
is a vector c.
as an example:
a=[1 4 1 4 4 1];
b=[1 6 8 3 9 2];
c=[1 6 6 6 6 8 3 3 3 3 9 9 9 9 2]
Is there any vectorization solution for this proplem?
Regards
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Digital Filter Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!