# groupfilter

## Syntax

## Description

### Table Data

returns the rows of table or timetable `G`

= groupfilter(`T`

,`groupvars`

,`method`

)`T`

that satisfy the group-wise
filtering condition specified in `method`

. The filtering condition
`method`

is a function handle applied to each nongrouping variable.
Groups are defined by rows in the variables in `groupvars`

that have the
same unique combination of values. For example, ```
G = groupfilter(T,"Trial",@(x)
numel(x) > 5)
```

groups the data in `T`

by
`Trial`

, and keeps the rows that belong to groups with more than five
trials.

You can use `groupfilter`

functionality
interactively by adding the Compute by Group task to a live script.

### Array Data

returns the rows of vector or matrix `B`

= groupfilter(`A`

,`groupvars`

,`method`

)`A`

that satisfy the group-wise
filtering condition specified in `method`

. The filtering condition
`method`

is a function handle applied to all column vectors. Groups are
defined by rows in the column vectors in `groupvars`

that have the same
unique combination of values.

You can use `groupfilter`

functionality
interactively by adding the Compute by Group task to a live script.

## Examples

## Input Arguments

## Output Arguments

## Alternative Functionality

### Live Editor Task

You can use `groupfilter`

functionality interactively by adding the
Compute by
Group task to a live script.

## Extended Capabilities

## Version History

**Introduced in R2019b**

## See Also

### Functions

`groupsummary`

|`groupcounts`

|`grouptransform`

|`findgroups`

|`splitapply`

|`discretize`

|`varfun`

|`rowfun`