matrix variable problem in matlab

5 views (last 30 days)
I have A=[1 2]' I would like to display it in repetitive form as A=[1 2 1 2 1 2 1 2 1 2 1 2]' using loop structure, any help please

Accepted Answer

Ankit
Ankit on 3 Feb 2022
Edited: Ankit on 3 Feb 2022
read more about repmat
A = [1 2]';
A = repmat(A,6,1);

More Answers (0)

Categories

Find more on Multidimensional 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!