How to find the largest length of a cell array?
조회 수: 32 (최근 30일)
이전 댓글 표시
Hi,
How can I find out the largest size of a cell array element?
For example, this f array contains many doubles within it and I want to find out the largest array size of f. (which is, I know, 500315). But don't know how to find it out.
댓글 수: 0
채택된 답변
Walter Roberson
2023년 4월 4일
max(cellfun(@length, YourCell))
댓글 수: 2
Walter Roberson
2023년 4월 4일
use the two output form of max. The second output will be the index of the largest cell.
(Well, of one of the cells that is the largest, you might have more than one that length)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!