MATLAB Problem
For example if in the first column, the entries are
1
1
1
0
0
0
0
0
1
1
the middlemost zero is in the 6th row and i want to get the number 6. please help me with this.
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
@predictor-lfVrRm • Apr 5, 2009
sindhyaI have a 400 by 640 matrix of ones and zeros. The zeros are near each other and I want to know if there is a function by which i can find the index of the middlemost zero in each column.
For example if in the first column, the entries are
1
1
1
0
0
0
0
0
1
1
the middlemost zero is in the 6th row and i want to get the number 6. please help me with this.
@silverscorpion-iJKtdQ • Apr 5, 2009
@predictor-lfVrRm • Apr 5, 2009
Yes, although I assumed this was the case, given this phrase in the original post: The zeros are near each othersilverscorpionThe above method is correct.
Btw, it should be noted that it will only work if all the zeros occur continuously, ...
I don't believe that this is a necessary condition for my suggestion to work:silverscorpion... and they occur in the middle of the sequence.