roll = zeros(1,300);for i = 1:300 dice = 1 + ceil(11*rand(1));endfreeornah = roll+dice(i)
freeornah = roll+dice(i)I keep getting the error index exceeds the number of array elements(1). I am trying to add each number in the column vector roll with each dice roll. Then I'm trying to create a logical where if the number I receive for freeornah is true if it is either 11 or 12.
Best Answer