Extracting data from vector

1 visualización (últimos 30 días)
Elijah L
Elijah L el 16 de Sept. de 2020
Respondida: jonas el 16 de Sept. de 2020
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

Respuestas (1)

jonas
jonas el 16 de Sept. de 2020
sum(NUM(NUM>5))

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by