Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Returning values in a matrix between 1 and 2

2 vues (au cours des 30 derniers jours)
Kimberly
Kimberly le 20 Avr 2014
Clôturé : MATLAB Answer Bot le 20 Août 2021
how would I write a script that returns the values in a matrix between 1 and 2. both using for loops and not.
  4 commentaires
Star Strider
Star Strider le 20 Avr 2014
See the gt function and its friends (all linked-to at the end of the page).
Kimberly
Kimberly le 21 Avr 2014
I just ended up using the find function for the matrix and it worked

Réponses (1)

Walter Roberson
Walter Roberson le 21 Avr 2014
See also logical indexing
values = YourMatrix(YourMatrix > 1 & YourMatrix < 2);

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by