Main Content

extractAll

Occurrences of specified J1939 parameter groups

Description

example

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

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 in pgname.

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 thej1939ParameterGroup or receive function 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 the pgname argument.

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 the pgname argument.

Version History

Introduced in R2015b