I have created a script. I wish to loop this a 1000 times and place the result in a Histogram. Below is the script.
k= min(10,randi([1,13]));a=0;while k < 17 r = min(10,randi([1,13]));if r==1 a= a+1; r=11; k=k+r; else k=k+r; endif k>21 && a > 0 k = k - 10; a=a-1;endendk
I can run the script as a loop, but that does not help me at all with creating a Histogram.
Best Answer