sketching function

Compute a sketch matrix of input matrix