repeating numbers in matrix
Show older comments
I need to generate a input variation in the form
% For wxample
col1 :2 4 6 2 4 6 2 4 6 2 4 6
col2 :1 1 1 1 1 1 2 2 2 2 2 2
col2 :5 5 5 5 5 5 5 5 5 5 5 5
is there any shorter way to do it without looping.
Accepted Answer
More Answers (1)
Check Codes
on 4 Jan 2021
0 votes
P=[6 9 13 31 18]; position=5; Q=[285 65]; /Period matrix number of period =3;
o/p part: out_put =[6 9 13 31 285 65 285 65 285 85 18];
Categories
Find more on Creating and Concatenating Matrices 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!