Azzera filtri
Azzera filtri

Extracting data from vector

2 visualizzazioni (ultimi 30 giorni)
Elijah L
Elijah L il 16 Set 2020
Risposto: jonas il 16 Set 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

Risposte (1)

jonas
jonas il 16 Set 2020
sum(NUM(NUM>5))

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by