listlib::setDifference

Remove elements from a list

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

listlib::setDifference(list1, list2)

Description

listlib::setDifference(list1, list2) removes all elements from list1, that are given by list2.

    Note:   The order of the list is not preserved.

Examples

Example 1

listlib::setDifference removes 2, 4, 6 and 8 from the given list:

listlib::setDifference([1, 2, 3, 4, 5, 6, 7, 8], [2, 4, 6, 8])

Parameters

list1, list2

A MuPAD® list

Return Values

First list without all elements of the second list

See Also

MuPAD Functions

Was this topic helpful?