MATLAB: Iid

iid

I want to form an matrix,please help how to process
1)Set each entry of the matrix to an i.i.d. N(0; 1) value.
2)Orthogonalize the d rows of the matrix using the Gram-Schmidt algorithm
3)Normalize the rows of the matrix to unit length (i.e., important for preserving similarities in the lowdimensional space).

Best Answer

Can't you do:
A = randn(10,10);
Q = orth(A');
or even
Q = qr(A');