I am trying to create a matrix that is 3 x n, with each of the columns being the same. What's the easiest way of achieving it? Concatenation?
After
n=7
x=[1;2;3]
it's either
repmat(x,[1 n])
or
x(:,ones(1,n))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With