Documentation

extractAll (J1939)

Occurrences of specified J1939 parameter groups

Description

example

extractedPGs= extractAll(pgrp,pgname)returns all parameter groups whose name occurs inpgname.

example

[extractedPGs,remainderPGs] = extractAll(pgrp,pgname)also returns a parameter group array,remainder, containing all groups from the original array not matching the specified names inpgname.

Examples

collapse all

Extracts all the parameter groups with a name of'PG1'or'PG2'.

extractedPGs = extractAll(pgrp,{'PG1''PG2'})

Extract all parameter groups with a name of'PG1'or'PG2', and also return unmatched parameter groups to a different array.

[extractedPGs,remainderPGs] = extractAll(parameterGroups, {'PG1''PG2'})

Input Arguments

collapse all

J1939 parameter groups, specified as an array of ParameterGroup objects. Use thej1939ParameterGrouporreceivefunction to create ParameterGroup objects.

Names of J1939 parameter groups to extract, specified as a character vector, string, or array of these.

Example:'PG1'

Data Types:char|string|cell

Output Arguments

collapse all

Extracted parameter groups, returned as an array of ParameterGroup objects. These parameter groups have names matching any of those specified in thepgnameargument.

Remainder of parameter groups, returned as an array of ParameterGroup objects. These are all the parameter groups with names not matching any of those specified in thepgnameargument.

Introduced in R2015b