Clear Filters
Clear Filters

How to extend array?

3 views (last 30 days)
Rikke
Rikke on 30 Apr 2019
Commented: Rikke on 30 Apr 2019
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?

Accepted Answer

madhan ravi
madhan ravi on 30 Apr 2019
repelem(A,B)

More Answers (0)

Categories

Find more on Data Types in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!