[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
handling NaN
From: |
Heber Farnsworth |
Subject: |
handling NaN |
Date: |
30 Jul 2002 16:57:42 -0500 |
I'm have trouble with NaN values. I don't mind that they come up
occasionally but I need to know how to get rid of them. I'm evaluating
a function at various points and I need to pick the maximum point.
Occasionally the point will be an illegal one and it's difficult to
predict when that will happen. Obviously I don't want that point.
However the following behavior of octave makes it difficult to get the
point I do want.
$ octave -q
octave:1> f = [1 2 3 NaN]
f =
1 2 3 NaN
octave:2> max(f)
ans = NaN
octave:3> min(f)
ans = NaN
octave:4>
If NaN is both the min and max of any vector it is contained in then how
do I get octave to return the value I want (3 in this case)?
Heber
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- handling NaN,
Heber Farnsworth <=