sum(NUM(NUM>5))
Extracting data from vector
2 次查看(过去 30 天)
显示 更早的评论
I have vector NUM = [-1 2 6 9 22 4 23 18] and I want to find all numbers that are greater than 5 and then add them all up. example: the answer is 78
0 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!