# [ACCEPTED]-Avoid Generating a singular matrix in MATLAB-matlab

Accepted answer

A randomly generated matrix will be full 5 rank (and hence invertible, if square) with 4 probability 1:

```
A = randn(5000);
```

you can check this by using 3 `min(svd(A))`

, and verifying that the smallest singular 2 value is larger than zero.

This is a well-known 1 fact, but here's an example paper if you want one.

Source:
stackoverflow.com

More Related questions

Cookie Warning

We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.