Extracting data from vector

2 次查看(过去 30 天)
Elijah L
Elijah L 2020-9-16
回答: jonas 2020-9-16
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

回答(1 个)

jonas
jonas 2020-9-16
sum(NUM(NUM>5))

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by