Borrar filtros
Borrar filtros

How to select a range of data in matrix

7 visualizaciones (últimos 30 días)
Austin Ukpebor
Austin Ukpebor el 13 de En. de 2021
Comentada: Austin Ukpebor el 13 de En. de 2021
I have a column matrix (10608x1) with a minimum value of 38.8 and maximum value of 192.8. I want to retain the matrix with the range of minimum values to a certain number say 44.1. Please I need a help to achieve this. Thanks

Respuesta aceptada

KSSV
KSSV el 13 de En. de 2021
Let A be your column matrix.
idx = A <= 44.1 ; % get indices using logical indexing
iwant = A(idx) ; % Extract those elements
Read about logical indexing of arrays in MATLAB.

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by