Hi our Community on MATLAB,
I have specific problem to solve for a matrix of 143X143 which have values only 0 and 1. Please see the screenshot.
Below is the discription of tasks need to be performed.
1 - Starting fro first column, seach the place (row number) of value 1. For example it is at row number 3 for first column.
2 - If the value 1 is found in the column at 'n' th row, then jump to the 'n' th column and search for value 1 in that. For Example, value 1 has been found at row 3 so jump to column 3 and search value 1. And so on.
3 - The loop must break when there are no 1 found in the column (all zero column). And then the same process must start from column 2 this time untill all zero column.
4 - The output I need is the count of the jumps for each columns untill all zeros column.
I have attached the excel file of the data as DAG.xlsx.
I request the MATLAB community to please help me to develop the code for this task.
Please feel free to write if my explaination is not understandble.
Thank you very much in advance.