Bill Press
08-17-2009, 02:01 PM
In Section 16.3, in function markovgen, in the line 11 from the bottom (r=ran.doub() / cum[j][m-1]), the "/" (divide) should be a " * " (multiply). This bug only affects the case where the function is trying to recover from questionable user input, namely transition matrix row sums that are not exactly 1.
Thanks to SimonG for finding this (see thread (http://www.nr.com/forum/showthread.php?p=3949)).
Thanks to SimonG for finding this (see thread (http://www.nr.com/forum/showthread.php?p=3949)).