i want to print [1;1;1;1;1;1;1;1;1;1;1;1;1;;1;1;1;1;1;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;3;3;3;3;;33;3]. but without typing numbers all the time. how to print 14 times 1, 20 times 2, 50 times 3 in one column vector.
MATLAB: How to make a colum of multiple 1 to 5. i want to make column vector of [1;1;1;1;1;1;1;1;1;1;1;1;1;1;2;2;2;2;2;2;2;2;2;2;2;2;2;2;3;3;3;3;3;3;3;3;3;3;3;3;3]. is there any way to make this kind of vector instead of typing this many times.
functionmatrixvector
Related Question
- Put elements into corresponding locations of upper triangular matrix
- From a=[1 2 3 4] to b=[1 1 2 2 3 3 4 4]
- Make column in a matrix: 1,1,1,2,2,2,3,3,3 etc
- How to divide a long vector into several vectors of known length
- How to generate the matrix [1 1; 1 2; 1 3 ; 2 1; 2 2; 2 3; 3 1 ; 3 2 ; 3 3] without loops
- How many times does each number appear
Best Answer