My question is: I want to delete columns that possess the sum equal 1, however, when I use the function "for" occurs a problem….For each time that is deleted a column, the matrix is decreasing the number of columns, so that index used above exceed size of matrix….how can I solve this problem?
for j=1:794; if S(j,1)==1; X(:,j)=[]; endend
when perform this command is showed:
??? Index of element to remove exceeds matrix dimensions.thanks
Best Answer