Cell array without empty variables
이전 댓글 표시
I need to create a new cell array using values from another, but excluding the empty values for example... [] 2 [] 1 I would like to have a new a cell array that only includes the 2 and the 1 and skip the empty values. so the final would just read...2 1
채택된 답변
추가 답변 (1개)
John D'Errico
2016년 4월 22일
0 개 추천
Use cellfun with isempty to identify those cells that are empty. Then just delete those elements like you would delete elements of any other array.
카테고리
도움말 센터 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!