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

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

[Octave-bug-tracker] [bug #41839] sprand/sprandn functions with 4rth par


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #41839] sprand/sprandn functions with 4rth parameter missing in Octave
Date: Fri, 21 Mar 2014 00:56:51 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36

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

Your patch is working for me without problems, but I have some remarks to your
patch:

1) In sprandn you simply copied the test cases from sprand, therefore you
check the "wrong" functions there.

2) MATLAB 2013b accepts the following test cases:


>> sprand (6, 4, 0.2, [1 2 3 4 5])

ans =

   (1,1)       2.0000
   (5,2)       3.0000
   (2,3)       0.7071
   (6,3)       0.7071
   (3,4)       4.0000

>> sprand (4, 6, 0.2, [1 2 3 4 5])

ans =

   (3,1)       0.7071
   (4,2)       3.0000
   (1,3)       4.0000
   (3,4)       0.7071
   (2,5)       2.0000


Same for sprandn.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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