Determine a percentage.
이전 댓글 표시
I need to create a vector with 1000 random number between 10 and 20 and determine the percentage of values superior of 17.
to creat the vector i use : 10+10.*rand(1,1000)
how to determine the percentage now?
답변 (1개)
Andrei Bobrov
2011년 11월 5일
d = unifrnd(10,20,15,1)
out = nnz(d>17)/numel(d)*100
카테고리
도움말 센터 및 File Exchange에서 Simulink 3D Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!