Mercurial > hg > octave-terminal
changeset 9730:dd4aa19c3053
update docstring of lookup
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 15 Oct 2009 10:13:07 +0200 |
parents | 3b7e644bb46d |
children | 7b9cbaad68d6 |
files | src/ChangeLog src/DLD-FUNCTIONS/lookup.cc |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2009-10-15 Jaroslav Hajek <highegg@gmail.com> + + * DLD-FUNCTIONS/lookup.cc (Flookup): Update docstring. + 2009-10-15 Jaroslav Hajek <highegg@gmail.com> * ov.h (octave_value::octave_value (octave_base_value *, bool)) : New constructor.
--- a/src/DLD-FUNCTIONS/lookup.cc +++ b/src/DLD-FUNCTIONS/lookup.cc @@ -142,13 +142,13 @@ If table is increasing and @code{idx = lookup (table, y)}, then\n\ @code{table(idx(i)) <= y(i) < table(idx(i+1))} for all @code{y(i)}\n\ within the table. If @code{y(i) < table (1)} then\n\ -@code{idx(i)} is 0. If @code{y(i) >= table(end)} then\n\ +@code{idx(i)} is 0. If @code{y(i) >= table(end)} or @code{isnan (y(i))} then\n\ @code{idx(i)} is @code{n}.\n\ \n\ If the table is decreasing, then the tests are reversed.\n\ For non-strictly monotonic tables, empty intervals are always skipped.\n\ The result is undefined if @var{table} is not monotonic, or if\n\ -@b{any} of @var{table} or @var{y} contains a NaN.\n\ +@var{table} contains a NaN.\n\ \n\ The algorithm used by lookup is standard binary search, with optimizations\n\ to speed up the case of arrays containing pre-ordered portions (sampling).\n\