Question: Extract a random submatrix of given type

Having  Matrix say A of dimensions n×m

Writing a function that 

Will choose k  columns of the matrix at 

At random where one of the column that is column m is the last column of output matrix that is after choosing k columns from the first m-1 column

We append the column m as last column to the new random matrix and the function returns the new matrix M

Kind help

k can be any big number less than m-1

Please Wait...