Problem with ''if''
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everyone, I have this variable:
values =
[] [1x27 char] [1x32 char] [1x28 char] [1x34 char]
and i want have a check for empty cells. I use :
if values[ ]==[ ]
....
end
But unfortunately....
??? Conversion to logical from cell is not possible. What can i do???
댓글 수: 0
채택된 답변
Robert Cumming
2011년 7월 20일
cellfun ( @isempty, values )
댓글 수: 5
Oleg Komarov
2011년 7월 20일
idx = cellfun('isempty',values);
find(~idx,1,'first')
Finds the location of the first non-empty.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!