% gambler's ruin
% need a table of s by j values, for different p's
pvs=[0.05, 0.15, 0.25, 0.35, 0.45];
svs=10+[1:10];
jvs=20+[1:10];
ptab=zeros(10, 10, 5);
for i=1:10
    for j=1:10
        for k=1:5
            for l=1:100
                ptab(i, j, k)=ptab(i, j, k)+runruin(svs(i), jvs(j), pvs(k));
            end
        end
        fprintf(1, '*');
    end
end
mtab=zeros(10, 10, 5);
for i=1:10
    for j=1:10
        for k=1:5
            for l=1:100
                mtab(i, j, k)=mtab(i, j, k)+runmartruin(svs(i), jvs(j), pvs(k));
            end
        end
        fprintf(1, '*');
    end
end

            
