Extract values from a matrix
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Patrick Chow
el 15 de Nov. de 2019
Respondida: Guillaume
el 15 de Nov. de 2019
let say I have a matrix:
[ 3 2 4 ; 3 5 1]
I want to extract all the values that are greater than 3 and use all these extracted values to find the mean value.
How should I approach this?
0 comentarios
Respuesta aceptada
Guillaume
el 15 de Nov. de 2019
mean(yourmatrix(yourmatrix >= 3)) %mean of all values greater than or equal to 3
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!