How to pick values that is below a certain value in a matrix/vector

53 vues (au cours des 30 derniers jours)
Trond Oesten
Trond Oesten le 15 Avr 2015
Commenté : Trond Oesten le 15 Avr 2015
Hi,
I have a vector (A) that contains 10 values.
E.g. A = [1 5 9 4 6 2 1 7 6 4]
What I want is to pick values from the vector that is larger than 5 and sample these in a new vector.
Is there an easy way to do this?
Thanks!

Réponse acceptée

Renato Agurto
Renato Agurto le 15 Avr 2015
you can try:
B = A(A>5)
I hope this helps

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by