Borrar filtros
Borrar filtros

hi, I want to find he index value of non-zero vectors in a cell array. How do I do that ? TIA

3 visualizaciones (últimos 30 días)
for example E= 4×4 cell array
[0] [1×3 double] [1×3 double] []
[0] [] [1×3 double] [1×3 double]
[0] [] [] [1×3 double]
[0] [] [] []
Then how do I find which cells if column two contains non-zero vectors?

Respuestas (1)

KSSV
KSSV el 23 de Oct. de 2017
x = cell(3) ;
x{1,1} = rand(2) ;
x{2,2} = rand(3) ;
find(~cellfun(@isempty,x))

Categorías

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