MATLAB: How to create a matrix of equal element value

matrix arraymatrix manipulation

If I want to create a 5 by 80 matrix of value 121 for each element, how can I do that? example A variable y is a 2 by 2 matrix of value 5 for each element is : y = [5,5;5,5]

Best Answer

y = 121*ones(5,80);