How to compute the following questions
2 次查看(过去 30 天)
显示 更早的评论
StudentID Test 1 Test 2 Final Total
1201 66 75 70 70.5
1210 69 60 77 69.9
1215 82 85 68 76.6
1220 92 89 95 92.5
1235 49 58 54 54.0
1238 75 87 90 85.3
1239 81 65 62 67.7
1240 40 39 30 35.2
1255 65 70 55 62.0
1257 67 83 80 77.7
1270 48 53 60 54.9
1271 68 78 55 65.2
Hi, I got this table and I wanted to compute how many students have there final mark better than total what commands should i use. I use the boolean expression and i got logical array in return but the number of students whose got their final better than their total.
0 个评论
回答(1 个)
Walter Roberson
2024-2-23
You can use
nnz(BooleanArray)
or
sum(BooleanArray)
to get the number of selected results.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Hypothesis Tests 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!