Filter löschen
Filter löschen

How to find the minimum length of a cell array

5 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))

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by