How to find the minimum length of a cell array

5 次查看(过去 30 天)
M= {10x107} {10x108} {10x103} {10x105}
how do i find the minimum length among the cells? eg. 103

采纳的回答

Matt J
Matt J 2017-12-10
min( cellfun(@(c) size(c,2), M) )

更多回答(1 个)

Stephen23
Stephen23 2017-12-11
编辑:Stephen23 2017-12-11
Simpler and faster:
min(cellfun('size',M,2))

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by