MATLAB: Removing rows from all columns based on values of one column

logical indexingrow removal

Hi all, i have a data of 732×26 and one of the column contains unwanted values, i used
logicalIndex = FOMassFlow > MeanFOMassFlow;
FOMassFlow = FOMassFlow(FOMassFlow ~= 0)
to remove the unwanted values of the particular column. How can i remove the rows of the unwanted values in the data of 732×26 ? (example, unwanted values found in column 5 row 6, i would like to remove the entire row 6 in the data of 732 rows by 26 columns)

Best Answer

Here is an example
X = randi([1 10],10,3) % example data
TF = X(:,3) > 5 % for which rows is column 3 larger than 5
X(TF,:) = [] % remove those rows