필터 지우기
필터 지우기

any faster/straightforward way to find the location of empty cell in a cell array

조회 수: 2 (최근 30일)
Hi:
I have a cell array called 'tmp', it is either '1' or 'empty' inside. I want to find the location where '1' is in the 'tmp', what I did is use 'for-loop' to read inside one-by-one. is there any more straightforward way to do this?
Thanks!
Yu

채택된 답변

madhan ravi
madhan ravi 2018년 11월 26일
편집: madhan ravi 2018년 11월 26일
index=find(cellfun(@isempty,tmp(:))) %returns index
command window:
index =
1
2
3
4
10
11
>>
  댓글 수: 4

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by