MATLAB: How Create a vector given size(N) and the value of the max element(M)

MATLABvector

How Create a vector given size(N) and the value of the max element(M)?

Best Answer

Are those the only conditions?
linspace(1, M, N)
has N values which range from 1 to M.