Kinda confusing what you're asking.
If your input matrix is M, just write
ones(size(M))
for a matrix of ones the same size as your input matrix.
If you don't have an input matrix to get the size, and want a matrix of ones that is 3 x 6, write
ones(3,6)
If I didn't answer your question, it's because it wasn't very clear. You should read this: http://www.mathworks.com/help/matlab/ref/ones.html