[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: bug in a(a<3)?

**From**: |
Dirk Eddelbuettel |

**Subject**: |
Re: bug in a(a<3)? |

**Date**: |
Mon, 6 Sep 1999 11:20:49 -0400 (EDT) |

If in doubt, read the manual:
--------------------- snip ------------------------------------------------
This operation can be useful for selecting elements of a matrix
based on some condition, since the comparison operators return matrices
of ones and zeros.
This special zero-one form of indexing leads to a conflict with the
standard indexing operation. For example, should the following
statements
a = [1, 2; 3, 4];
a ([1, 1], :)
return the original matrix, or the matrix formed by selecting the first
row twice? Although this conflict is not likely to arise very often in
practice, you may select the behavior you prefer by setting the built-in
variable `prefer_zero_one_indexing'.
--------------------- snip ------------------------------------------------
--
According to the latest figures, 43% of all statistics are totally worthless.
---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL. To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------