Zero matrix elements

  • Thread starter Mr Peanut
  • Start date
  • #1
30
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?
 

Answers and Replies

  • #2
AlephZero
Science Advisor
Homework Helper
6,994
291
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/
 

Related Threads on Zero matrix elements

  • Last Post
Replies
12
Views
3K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
2
Views
10K
Replies
8
Views
3K
  • Last Post
Replies
7
Views
8K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
1
Views
1K
Replies
4
Views
5K
  • Last Post
Replies
6
Views
6K
  • Last Post
Replies
5
Views
2K
Top