Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how to select items from a matrix depending on their values

2 visualizaciones (últimos 30 días)
anu
anu el 2 de En. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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

Respuestas (1)

Image Analyst
Image Analyst el 2 de En. de 2014
Try this:
m = [1 2 3 4 5 6 7 8 9 10]
elementsToExtract = m > 5 & m < 7
extractedElements = m(elementsToExtract)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by