MATLAB: How to create a user generated matrix in Matlab

columsMATLABmatrixrowsuser-defined

Hello,
I am a student who has been tasked with writing a program that asks the user to define how many rows and columns a matrix should have. After which point, the user will be again asked what values go in each cell of the matrix. Where I am having trouble, is figuring out how to take the number of rows and columns that a user defines, and turn that into a matrix.
This is what I have so far:
Rows = input('Please input the number of rows you would like to have: ');
disp(' ');
Columns = input('Please input the number of columns you would like to have: ');
disp(' ');
If, for example the user wanted a matrix with 1 row and 4 columns, how would I go about generating said matrix given the user input?
Edit: Is it possible to achieve what I am asking, without simply having a user input a whole matrix?

Best Answer

M = input('Input matrix: ');
%then input [1,2;3,4;5,6;7,8;9,10] for a matrix of 5 rows and 2 columns, or whatever matrix you want.