Remove - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


MultiSet/Remove

remove a number of occurrences of an element of a MultiSet

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Remove( M, x, n )

Remove( M, x=n )

Remove( M, [x, n] )

Remove( M, x )

Parameters

M

-

MultiSet; a MultiSet

x

-

anything, an expression

n

-

nonnegint, number of copies of x to remove from M

Description

• 

Each of the first three calling sequences, Remove( M, x, n ), Remove( M, x=n ), and Remove( M, [x, n ] ), reduces the multiplicity of x in the MultiSet M by n.

• 

The fourth calling sequence, Remove( M, x ), removes all occurrences of x from M.

• 

The new multiplicity of x in M is returned.

Examples

MMultiSeta=2,b=5,c=4

Ma,2,b,5,c,4

(1)

RemoveM,b,3

2

(2)

M

a,2,b,2,c,4

(3)

RemoveM,b=2

0

(4)

M

a,2,c,4

(5)

RemoveM,c

0

(6)

M

a,2

(7)

Compatibility

• 

The MultiSet/Remove command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

MultiSet

MultiSet/Entries

MultiSet/Insert