Suppose I have an row x col array, called A, for example.
In column 10, say, there are many different values. Some of these are 0. How do I change A so that all rows that contain 0 in column 10 are deleted?
Suppose I have an row x col array, called A, for example.
In column 10, say, there are many different values. Some of these are 0. How do I change A so that all rows that contain 0 in column 10 are deleted?
rows_to_keep = findall(...)
A[rows_to_keep, :]
Try
rows_to_keep = A[:,10] .!= 0