(
Jump to the original submission)
Tue 01 May 2012 02:21:17 AM UTC, comment #8:
I pushed the changeset to stable
|
Tue 01 May 2012 01:14:31 AM UTC, comment #7:
No.
|
Mon 30 Apr 2012 11:39:13 PM UTC, comment #6:
Any objection to pushing the changeset to stable ?
|
Mon 30 Apr 2012 09:40:37 PM UTC, comment #5:
As an aside, it's interesting to note that this gives another good case for why 0^0 = 1. :-)
|
Mon 30 Apr 2012 08:53:37 PM UTC, comment #4:
>> poissrnd(0,1,1)
ans =
0
>> version
ans =
7.9.0.529 (R2009b)
>>
|
Mon 30 Apr 2012 08:11:00 PM UTC, comment #3:
I don't have access to Matlab's statistics toolbox.
|
Mon 30 Apr 2012 07:32:21 PM UTC, comment #2:
For another opinion, what does Matlab report for the sample code? Does it return NaN or 0?
|
Sun 29 Apr 2012 04:52:47 PM UTC, comment #1:
I've attached a patch for testing.
(file #25754)
|
Sat 28 Apr 2012 02:00:27 PM UTC, original submission:
Hi
poissrnd(0, 1,1)
returns a NaN.
Poissonrnd should return a zero instead.
(Mathematically there is nothing wrong with a poisson process
with rate 0, the outcome is simply always zero)
The fix is simple.
In poissrnd.m replace twice
if (lambda > 0...
with
if (lambda >= 0...
Note this is a regression from bug jwe@5154 reported ages ago.
|
(Note: upload size limit is set to 16384 kB, after insertion of the required
escape characters.)
Attach File(s):
Comment:
Depends on the following items: None found
Items that depend on this one: None found
Follow 6 latest changes.