필터 지우기
필터 지우기

QUestion regarding Number of elements in a cell

조회 수: 1 (최근 30일)
John
John 2013년 12월 3일
답변: Walter Roberson 2013년 12월 3일
I've a cell array
X{1,1} = [1,2,3,4];
X{1,2} = [1,3];
X{2,1} = [1,3,4];
X{2,2} = [1,4,5];
I wanted to find the number of elements in each cell. my output should be ,for example, number of elements in X{1,1} = 4 and so on. Is there a function that I could use?

채택된 답변

Walter Roberson
Walter Roberson 2013년 12월 3일
cellfun(@numel, X)

추가 답변 (0개)

카테고리

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