作业帮 > 英语 > 作业

请帮忙用matlab My telephone rings 12 timeseach week,the calls be

来源:学生作业帮 编辑:神马作文网作业帮 分类:英语作业 时间:2024/11/19 05:11:58
请帮忙用matlab
My telephone rings 12 times
each week,the calls being randomly distributed among the 7 days.What is the
probability that I get at least one call each day?
请帮忙用matlab My telephone rings 12 timeseach week,the calls be
昨天不是给你代码了么?改改就行了
res=[];
for i = 1:50000
u=fix(7*rand(1,12))+1;
is_included = 1 ;
for j = 1:7
if( sum(u==j)==0 ) %j对应的数字没有包含
is_included = 0 ;
break;
end
end
res = [res is_included];
end
sum(res)/length(res)