How to find the minimum length of a cell array

4 Ansichten (letzte 30 Tage)
Joseph Lee
Joseph Lee am 10 Dez. 2017
Bearbeitet: Stephen23 am 11 Dez. 2017
M= {10x107} {10x108} {10x103} {10x105}
how do i find the minimum length among the cells? eg. 103

Akzeptierte Antwort

Matt J
Matt J am 10 Dez. 2017
min( cellfun(@(c) size(c,2), M) )

Weitere Antworten (1)

Stephen23
Stephen23 am 11 Dez. 2017
Bearbeitet: Stephen23 am 11 Dez. 2017
Simpler and faster:
min(cellfun('size',M,2))

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by