Example 2 
In this example, followed the work by in [1]}, we generate a random matrix \(A\)  of dimension \(m \times n\) , with rank \(r\) , and condition number \(\kappa \) . We sample an \(m \times r\)  Gaussian random matrix \(\Omega \)  with entries drawn independently from the standard normal distribution \(\mathcal {N}(0,1)\) , i.e., \(\Omega = randn(m,r)\) . The matrix \(\Omega \)  is generally not orthonormal column, we can make a QR decomposition \(\Omega = QR\) , where \(Q\)  is an \(m \times r\)  orthonormal matrix and \(R\)  is an \(r \times r\)  upper triangular matrix. Then, we generate the left singular matrix \(U_{A}\)  of \(A\)  by setting \(U_{A} = Q\) . By a similar method, we can generate the right singular matrix \(V_{A}\)  of \(A\) . Finally, for a given condition number \(\kappa \) , we choose the largest singular value \(\sigma _{\rm max}(A)\)  uniformly at random in \([a, b]\) , and find that the corresponding smallest singular value is \(\sigma _{\rm min}(A) = \sigma _{\rm max}(A)/\kappa \) . Other singular values are sampled from \((\sigma _{\rm min}(A), \sigma _{\rm max}(A))\) . In a word, the matrix \(A\)  is defined by
\(\begin{aligned}\Omega _1 & = {\rm randn}(m,r), \ [U_{A},R_{u}] = {\rm qr}(\Omega _1), \\\Omega _2 & = {\rm randn}(n,r), \ \ [V_{A},R_{v}] = {\rm qr}(\Omega _2), \\\sigma _{\rm max}(A) & = {\rm randperm}(b,a), \ \sigma _{\rm min}(A) = \sigma _{\rm max}(A)/\kappa , \\\Sigma _{A} & = {\rm diag[\sigma _{min}(A) + (\sigma _{max}(A) - \sigma _{min}(A))*rand(r,r)]};. \\A & = U_{A} \Sigma _{A}V^{T}_{A}.\end{aligned}\) 

