Generating $n\times n$ random matrix with rank $n/2$ using matlab

393 Views Asked by At

Can we generate $n \times n$ random matrix having any desired rank? I have to generate a $n\times n$ random matrix having rank $n/2$.

Thanks for your time and help.

1

There are 1 best solutions below

2
On BEST ANSWER

Generate $U,V$ random matrices of size $n \times n/2$, then almost surely $A = U \cdot V^T$ is of rank $n/2$.