[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: senseless warning in octave-3.6.2
From: |
Sergei Steshenko |
Subject: |
Re: senseless warning in octave-3.6.2 |
Date: |
Fri, 6 Jul 2012 08:32:09 -0700 (PDT) |
----- Original Message -----
> From: Przemek Klosowski <address@hidden>
> To: address@hidden
> Cc:
> Sent: Friday, July 6, 2012 4:29 PM
> Subject: Re: senseless warning in octave-3.6.2
>
> On 07/03/2012 11:14 AM, Sergei Steshenko wrote:
>
>> So, vector differentiation depending on row/column property can
> _definitely_ be abandoned - as the above example shows.
>>
>> Instead Octave developers in their "infinite wisdom" introduce
> outlandish
>>
>> row_vec OP col_vec -> matrix
>>
>> behavior and even make it default.
>
> There are three possible behaviors:
>
> - inner product: vector OP vector -> scalar
> - element-by-element vector OP vector -> vector
> - outer product vector OP vector' -> matrix
>
> Every one of them is useful in some circumstances. Matlab language didn't
> really provide outer product, and broadcast fixes that, so what's not to
> like? Just about the only criticism I'd accept is that it's easier to
> make mistakes by inadvertently triggering broadcast operations, but since you
> can turn it off if you know you are not intending to use it, there's no
> harm.
>
> On the other hand, many calculations can be expressed much more simply with
> the
> broadcast primitive.
>
> To step back a little, this discussion reminds me of the phrase "Who moved
> my cheese !?". There is a short and sweet book by that title, about how to
> learn to embrace change in our fast-paced world:
> I
> http://lifetofullest.com/who-moved-my-cheese/
>
> Whenever I feel buffeted by unexpected change, like Sergei in this case, I
> cheer myself up by remembering this idiom.
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
Oh G-d !
Again:
"
octave:1> foo = [1 2 3 4]
foo =
1 2 3 4
octave:2> bar = [5 6 7 8]'
bar =
5
6
7
8
octave:3> foo .* bar
warning: product: automatic broadcasting operation applied
ans =
5 10 15 20
6 12 18 24
7 14 21 28
8 16 24 32
octave:4>
".
I have _explicitly_ requested element by element operation by using '.*' and
_not_ plain '*'.
As a result I'm getting a _matrix_ and not a vector. _Exactly_ because I
_explicitly_ requested element by element operation on two vectors and instead
of a vector I got a matrix it is a _bug_.
Regards,
Sergei.
>
- Re: senseless warning in octave-3.6.2, (continued)
- Re: senseless warning in octave-3.6.2, Nicholas Jankowski, 2012/07/03
- Re: senseless warning in octave-3.6.2, Jordi Gutiérrez Hermoso, 2012/07/03
- Re: senseless warning in octave-3.6.2, Sergei Steshenko, 2012/07/06
- Re: senseless warning in octave-3.6.2, Nicholas Jankowski, 2012/07/06
- Re: senseless warning in octave-3.6.2, Jordi Gutiérrez Hermoso, 2012/07/03
- Re: senseless warning in octave-3.6.2, Jordi Gutiérrez Hermoso, 2012/07/03
- Re: senseless warning in octave-3.6.2, Martin Helm, 2012/07/03
- Re: senseless warning in octave-3.6.2, Przemek Klosowski, 2012/07/06
- Re: senseless warning in octave-3.6.2,
Sergei Steshenko <=
- Re: senseless warning in octave-3.6.2, Przemek Klosowski, 2012/07/06