MATLAB: In a column how to find the first cell to equal 0

cell referencezeros

I have this code so far:
for i = 7:length(mydata)
index = find (mydata{i,1}(:,5))== 0
end
However, this returns all the zeros in the whole matrix, I require a cell reference in column 5 as to when the first 0 occurs.

Best Answer

Run this
ixc = 3; % third column
sample_array = num2cell( magic(4)-3 );
is = cell2mat( sample_array( :, ixc ) ) == 0;
>> sample_array
sample_array =
[13] [-1] [ 0] [10]
[ 2] [ 8] [ 7] [ 5]
[ 6] [ 4] [ 3] [ 9]
[ 1] [11] [12] [-2]
>> is
is =
1
0
0
0