Borrar filtros
Borrar filtros

How to find positive values in 1500 matrices(720*1280)?

15 visualizaciones (últimos 30 días)
Wenyi Xiao
Wenyi Xiao el 26 de Abr. de 2019
Respondida: Matt J el 26 de Abr. de 2019
WeChat Screenshot_20190426114417.png
I've got a data like this. Each file contains zero and some positive values or all zeros.
I want to find which matrix contains positive values.

Respuestas (2)

Matt J
Matt J el 26 de Abr. de 2019
If C is your cell array
find(cellfun(@nnz,C))

KSSV
KSSV el 26 de Abr. de 2019
If A is your matrix.
idx = A>0 ; % this gives indices of posittive values
idx = sign(A) % this gives sign of values in A
A(A>0) % this gives values in A which are greater than 0
  1 comentario
Wenyi Xiao
Wenyi Xiao el 26 de Abr. de 2019
I want to keep n matrices that contains positive integers.
so there will be n*1 cell. Each contains 720*1280.
Do you know how?

Iniciar sesión para comentar.

Categorías

Más información sobre Structures 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