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에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by