Minor bug in markovgen?


SimonG
08-07-2009, 10:37 AM
Hi,

In Section 16.3, in function markovgen, in the line 11 from the bottom (r=ran.doub() / cum[j][m-1]), I believe that the "/" (divide) should be a " * " (multiply).

Otherwise any error in the normalizations gets amplified rather than corrected!

Simon

Bill Press
08-17-2009, 01:56 PM
Yes, you are correct. Thanks for finding this. Other users may take note that this bug only affects the case of the function attempting to recover from questionable user input (row sums not being exactly 1).

Cheers,
Bill P.