Borrar filtros
Borrar filtros

How to find the minimum length of a cell array

5 visualizaciones (últimos 30 días)
Joseph Lee
Joseph Lee el 10 de Dic. de 2017
Editada: Stephen23 el 11 de Dic. de 2017
M= {10x107} {10x108} {10x103} {10x105}
how do i find the minimum length among the cells? eg. 103

Respuesta aceptada

Matt J
Matt J el 10 de Dic. de 2017
min( cellfun(@(c) size(c,2), M) )

Más respuestas (1)

Stephen23
Stephen23 el 11 de Dic. de 2017
Editada: Stephen23 el 11 de Dic. de 2017
Simpler and faster:
min(cellfun('size',M,2))

Categorías

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