Effacer les filtres
Effacer les filtres

Extracting number in array at certain threshold and determine its position

6 vues (au cours des 30 derniers jours)
Suppose that i have an array, i want to extract the number that higher than 5 and i want to know their position too. how can i do it? Thanks in advance!!
X=[10 8 6 7 8 4 12]

Réponse acceptée

David Fletcher
David Fletcher le 7 Mai 2021
X=[10 8 6 7 8 4 12]
index=find(X>5)
values=X(index)

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Tags

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by