Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
how to select items from a matrix depending on their values
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
suppose i have a matrix [1 2 3 4 5 6 7 8 9 10] i want to select values which are greater than 5 but less than 7. i am not getting the right command
0 commentaires
Réponses (1)
Image Analyst
le 2 Jan 2014
Try this:
m = [1 2 3 4 5 6 7 8 9 10]
elementsToExtract = m > 5 & m < 7
extractedElements = m(elementsToExtract)
0 commentaires
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!