MATLAB: Is there a feature similar to Excel’s AutoFilter in MATLAB

filteringMATLABsortsorting

When I am importing ASCII data using the MATLAB Import Wizard or when I am inspecting a variable in the Array Editor, I would like to filter the data in a similar way as in Excel's AutoFilter feature.
The AutoFilter command in Excel, works with a range of cells set up as a database or list. When AutoFiltering is turned on, the row headers display drop-down arrows that let you specify criteria (such as "Age greater than 30"). Rows that don't match your criteria are hidden, but they are redisplayed when you turn off AutoFiltering.

Best Answer

A feature similar to Excel's AutoFilter is not available in MATLAB.
As a workaround you can write your own script or GUI which implements this feature. You can use relational operators in combination with FIND to select and display the desired rows. For example, the following script displays all rows which have a 2 in the second column:
A = [1 1 1; 1 1 2; 1 2 1; 1 2 2; 1 3 1; 1 3 2]
A =
1 1 1
1 1 2
1 2 1
1 2 2
1 3 1
1 3 2
rows = find( A(:,2) == 2 );
A(rows,:)
ans =
1 2 1
1 2 2