Extracting data from vector

1 回表示 (過去 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 Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by