For this question the answer has to be in programming script in mat lab.. Please
ID: 2085824 • Letter: F
Question
For this question the answer has to be in programming script in mat lab.. Please..im using matlab_r2017.
Explanation / Answer
Matlab Code:
countofSix = [];
probabilty = [];
num = 0;
for i=1:10
if randi(6)==6
num = num + 1;
end
end
countofSix = [countofSix num];
probabilty = [probabilty num/10];
num = 0;
for i=1:100
if randi(6)==6
num = num + 1;
end
end
countofSix = [countofSix num];
probabilty = [probabilty num/100];
num = 0;
for i=1:1000
if randi(6)==6
num = num + 1;
end
end
countofSix = [countofSix num];
probabilty = [probabilty num/1000];
num = 0;
for i=1:10000
if randi(6)==6
num = num + 1;
end
end
countofSix = [countofSix num]
probabilty = [probabilty num/10000]
output:
countofSix = [countofSix num]
probabilty = [probablty num/10000]
countofSix = 1 15 182 1623
probablty =
0.10000 0.15000 0.18200 0.16230
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.