I have an input matrix of size 3*13 double:
input=[0 0 1 0 0 0 1 1 1 0 0 0 0; 0 1 0 0 1 1 0 0 0 1 0 1 0; 0 1 1 1 1 0 0 0 1 0 0 1 0];
I want to know how many zeros subsequently have in
input(2,:)
The output should be:
output=[1 2 3 1 1];
I also want to know their starting index of zeros. It should look like:
index=[1 3 7 11 13];
How can i solve this problem?
Best Answer