Guest User

Untitled

a guest
Nov 20th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. function [p, A] = stop13(rolls)
  2. if nargin < 1
  3. rolls = 11;
  4. elseif rolls > 11
  5. rolls = 11;
  6. end
  7.  
  8. A = toeplitz(zeros(17,1),[0 ones(1,6)/6 zeros(1,10)]);
  9. A(1:6,1:6) = eye(6);
  10.  
  11. p = A^rolls * [zeros(16,1); 1];
  12. end
Add Comment
Please, Sign In to add comment