I use a loop to select certain rows from a matrix, satisfying the condition that the element in de first column of the row should be equal to 140,141,…,148.
w(1) starts at 140, so in de first time in the loop, the rows from the matrix are selected that have the element in the first column equal to 140. This happens 9 times, repeating for the other values of w.
I would like to store each "selection" from the matrix that is made in a matrix. I saw other similar questions but none of them helped me to solve this specific case.
M=9; i=1; w(1)=140; %select from frame 140
for m=1:M %to frame 148
w(m+1)=w(m)+i; Info=allInfo((allInfo(:,1)==w(m)),:) end
I hope someone can help me! Thanks in advance.
Best Answer