채택된 답변

David Hill
David Hill 2020년 4월 28일

1 개 추천

You could loop through this many times to attempt to get a better answer.
x=randi(100,100000000,5);
m=[20,63,78,11,45];
s=zeros(100000000,1);
for k=1:5
s=s+double(x(:,k)==m(k));
end
proB=sum(s>=3)/100000000;

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

질문:

2020년 4월 28일

편집:

2020년 4월 28일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by