Exclude NaN cells from a cell array
이전 댓글 표시
I have a cell array of n number of rows and one column. Each row contains an array.
I want to exclude these NaN cells or copy this cell array in a new one with skipping the NaN cells in the original.

채택된 답변
추가 답변 (1개)
David Hill
2020년 9월 6일
편집: David Hill
2020년 9월 6일
c=[];
for k=1:length(yourCell)
if ~isempty(yourCell{k})
c=[c,k];
end
end
newCell=yourCell(c);
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!