[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Matrix index, Please e-mail back.
From: |
John W. Eaton |
Subject: |
RE: Matrix index, Please e-mail back. |
Date: |
Wed, 6 Dec 2006 16:00:37 -0500 |
On 6-Dec-2006, Jorgen Andersson wrote:
| John W Eaton wrotte:
| "This happens because when you make a range using matrix values, only
| | the first element of the matrix values are used. In other words, if
| | M1 and M2 are matrices, then the range expression M1:M2 is equivalent
| | to M1(1):M2(2). Octave has this "feature" for compatibility with
| | Matlab.
| "
Of course this should have been M1(1):M2(1).
| Do any of you know why it works like this? Is it a feature?
| (I originally would have expected 3 ranges...)
You'll have to ask the MathWorks. Although I don't know of any code
that uses this feature intentionally, I don't see any strong
motivation for having Octave behave differently in this regard.
jwe