Sum Matrix excluding certain values

5 visualizaciones (últimos 30 días)
Li Chng
Li Chng el 4 de Dic. de 2019
Respondida: Adam Danz el 4 de Dic. de 2019
MatrixA = [1:10 ; 21:30 ; 8:17]
how to sum all the elements inside matrix A, if the element is greater than 3?

Respuesta aceptada

Adam Danz
Adam Danz el 4 de Dic. de 2019
y = sum(MatrixA(MatrixA > 3))

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by