octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug when dividing a scalar by a vector?


From: Montgomery-Smith, Stephen
Subject: Re: Bug when dividing a scalar by a vector?
Date: Thu, 12 Jan 2017 15:18:26 +0000

My guess is that it is solving the underdetermined equation:

x1+x2+x3+x4=1.

So both solutions are correct answers.  There are infinitely many correct answers.

If I had to choose, I guess I would go for the answer who square sum is minimized, which would favor Octave's answer.

From: Octave-maintainers <octave-maintainers-bounces+address@hidden> on behalf of Sebastian Schöps <address@hidden>
Sent: Thursday, January 12, 2017 9:08:59 AM
To: address@hidden
Subject: Bug when dividing a scalar by a vector?
 
While  "1/[1 1 1 1]" does not work in Octave nor Matlab "1/[1;1;1;1]" does
work in both. However, they disagree. Octave thinks

   0.25000   0.25000   0.25000   0.25000

but Matlab says

     1     0     0     0

Is that a bug? What would one expect?

Sebastian




--
View this message in context: http://octave.1599824.n4.nabble.com/Bug-when-dividing-a-scalar-by-a-vector-tp4681411.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]