Find empty cells in 3D cell?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a 3D cell RowXColXDep (12X125X1216), I want to find the empty cells (which row, column, and depth). I used:
[Row Col Dep] = find(cellfun(@isempty,channelResp));
but it did not work, it works only for 2D cells. Is there a solution for 3D cells?
Thanks in advance
댓글 수: 0
채택된 답변
Shubham Gupta
2019년 10월 3일
Try this:
[r,c] = find(cellfun(@isempty,channelResp));
[nR,nC,nD] = size(channelResp);
Dep = floor(c/nC-0.0001)+1;
Col = c - nC*(Dep-1);
Row = r;
Let me know if you have doubts.
댓글 수: 2
Shubham Gupta
2019년 10월 3일
I am glad I could help. Please, make sure to accept the answer if it solves your problem. Cheers
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!