Skip to content

Commit

Permalink
tweak discreteRnd
Browse files Browse the repository at this point in the history
  • Loading branch information
sth4nth committed Sep 17, 2019
1 parent 50a654c commit f20e50e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chapter11/discreteRnd.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
end
r = rand(1,n);
p = cumsum(p(:));
[~,x] = histc(r,[0;p/p(end)]);
[~,~,x] = histcounts(r,[0;p/p(end)]);

0 comments on commit f20e50e

Please sign in to comment.