octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #31421] discrete_pdf uses unsorted values


From: Muhali
Subject: [Octave-bug-tracker] [bug #31421] discrete_pdf uses unsorted values
Date: Mon, 25 Oct 2010 00:36:55 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11pre) Gecko/20100928 Firefox/3.6.11pre

Follow-up Comment #2, bug #31421 (project octave):

This seems to be caused after octave-3.2.3. The diff to my version 3.3.52+ is
this:

60c56
<     pdf (k) = ((x(k) * ones (1, m)) == (ones (n, 1) * v)) * p;
---
>     pdf (k) = p (lookup (v, x(k), 'm'));

With the newer version below (using 'lookup') you easily generate the error
by issuing

discrete_pdf(2, [2 1 3], [1 1 1]/3)

M.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31421>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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