I'd like to find the first non-zero in several segments of the same large matrix.
For example: x = [3 2 3 4 5 6 6 8 6 10; 0 0 1 0 2 0 0 1 0 1]';
Now within x(1:3, 🙂 and x(7:10, 🙂 I'd like to extract the first non-zero in the second column and write out the corresponding value of the first column…no idea how…any help much appreciated. Patricia
Best Answer