필터 지우기
필터 지우기

finding the exact location of empty cells

조회 수: 30 (최근 30일)
antonet
antonet 2012년 7월 1일
Dear all,
I have the following cell matrix
clear all
clc
k = cell(2,6)'
k{1} = '7';
k{12} = 3;
To find empty cells I use the usual command
pp=cellfun(@isempty,k)
But I can not "see" the exact position of the empty cells.
For example one empty cell is at the position (1,2)
I tried I=find(pp); and I got as a result the following
2
3
4
5
6
7
8
9
10
11
where I suppose 2 corresponds to (1,2). But this is not very explicit about which positions of the matrix are empty. And in my case I have matrices of huge dimensions
Any help is greatly appreciated

채택된 답변

the cyclist
the cyclist 2012년 7월 1일
Use two output arguments for the find() command:
[i,j] = find(pp);

추가 답변 (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