"y \= scalar" fails
Jaroslav Hajek
highegg at gmail.com
Thu Mar 6 01:21:37 CST 2008
On Wed, Mar 5, 2008 at 10:45 PM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> On 3-Mar-2008, John W. Eaton wrote:
>
> | On 3-Mar-2008, Jaroslav Hajek wrote:
> |
> | | OK, no problem. In my eyes, matrix \= scalar is confusing. Perhaps
> | | just because I've never seen it (because it does not work). Anyway, I
> | | think such an extension would be easy to implement. I'd even volunteer
> | | to do it if more people are interested.
> | | Does anyone else share Rolf's opinion?
> |
> | If you want M \ s (and presumably s / M) to work, then I think for
>
> Another possibility is to fix the documentation and instead of saying
> that x = M \ y is conceptually equivalent to x = inv (M) * y, we could
> say that it solves the set of equations M * x = y for the unknonwn
> vector X. Stated that way, I don't see any particular justification
> for special handling for scalar values of Y.
>
I agree. One more reason: giving this special meaning to s / M and M \
s could possibly make a user previously exposed to other matrix
languages (Fortran 95, R, Mathematica...) guess incorrectly that /
behaves like element-by-element operation. He'll still be surprised
that M / M or s / NDarray don't work. Anyone dealing with Octave (or
Matlab) should understand the difference between *,/ and .*,./
> Comments?
>
> jwe
>
>
>
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Bug-octave
mailing list