Select only a specific number of rows fulfilling a condition in MATLAB
Assume you have the following data matrix:
A =
1 11 22 33
44 13 12 33
1 14 33 44
Delete all rows of this matrix that don't accomplish the condition A(:, 4) == 33 and get the matrix of this form which only selects these rows:
A_new =
1 11 22 33
44 13 12 33