I want to extend an array like this:
A = [1 2 3 4];
B = [2 3 5 7];
C =[1 1 2 2 2 3 3 3 3 3 4 4 4 4 4 4 4];
How could I do that?

 採用された回答

madhan ravi
madhan ravi 2019 年 4 月 30 日

1 投票

repelem(A,B)

1 件のコメント

Rikke
Rikke 2019 年 4 月 30 日
Perfect, thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Types についてさらに検索

タグ

質問済み:

2019 年 4 月 30 日

コメント済み:

2019 年 4 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by