Do you help me create a matrix?

2 views (last 30 days)
DNdog =
7
11
Each element of the "DNdog" matrix must repeat 3 times. How can I do that?
So I mean:
DNdog =
7
7
7
11
11
11
Is there a custom command for this?

Accepted Answer

Andrei Bobrov
Andrei Bobrov on 4 May 2017
Edited: Andrei Bobrov on 4 May 2017
out = repelem(DNdog,3) ;
or
out = kron(DNdog,[1;1;1]);

More Answers (0)

Categories

Find more on Matrices and Arrays 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!