Filter Near-Zero Matrix Elements: Reasonable?

  • Context: Graduate 
  • Thread starter Thread starter Mr Peanut
  • Start date Start date
  • Tags Tags
    Elements Matrix Zero
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
Mr Peanut
Messages
30
Reaction score
0
Given A(m,n), eps = Machine Epsilon, fNorm = FrobeniusNorm(A), p >= 1

To filter noise near zero created by floating point error:

if (|Aij| < fNorm * eps *p)
Aij =0
end if

Seem reasonable?
 
Physics news on Phys.org
it's not reasonable, unless you know something more about where the "floating point errors" came from.

In some circumstances a matrix like ##\begin{pmatrix}10^{100} & 10^{-100} \\ 0 & 2 \times 10^{100} \end{pmatrix}## may be perfectly "well behaved", and the small off-diagonal term might be important.

A good (advanced) reference is some of the papers in http://www.netlib.org/lapack/lawns/