matlab rank of a matrix
Show older comments
Let R=ones(100,100). Obviously, rank(R) returns 1 for an answer. However, rank(R,1e-20), say, returns 17. Why? Thanks!
Accepted Answer
More Answers (1)
Benjamin Thompson
on 11 May 2022
0 votes
You are probably attempting to go below the numerical precision of your hardware and software:
eps
ans =
2.220446049250313e-16
» help eps
EPS Spacing of floating point numbers.
D = EPS(X), is the positive distance from ABS(X) to the next larger in
magnitude floating point number of the same precision as X.
X may be either double precision or single precision.
For all X, EPS(X) is equal to EPS(ABS(X)).
EPS, with no arguments, is the distance from 1.0 to the next larger double
precision number, that is EPS with no arguments returns 2^(-52).
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!