Combining two arrays by pointwise repeating the elements of A(i), B(i) times.

I want to combine two vectors (A and B) with the same length into a new vector (C) with length sum of B.
e.g.
A = [1,2,3,4]; B = [2,1,2,3];
C = [1,1,2,3,3,4,4,4]
Thus repeating the elements of A, B times.

カテゴリ

ヘルプ センター および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

質問済み:

2014 年 10 月 9 日

編集済み:

2014 年 10 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by