compare Arrays for equality - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Low-level Manipulation : Matrices, Vectors, and Arrays : ArrayTools : ArrayTools/IsEqual

ArrayTools[IsEqual] - compare Arrays for equality

Calling Sequence

IsEqual(Array1, Array2, ...);

IsEqual(Array1, Array2, ..., equalundefined);

Parameters

Array1, Array2

-

the Arrays to be compared, more Arrays are optional

equalundefined

-

(optional) treat undefined elements in Arrays as equal

Description

• 

The IsEqual(Array1, Array2, ...) function compares two or more arrays for equality with undefined elements treated as inequal.

• 

The option equalundefined causes the function to treat undefined elements as equal.  The default value is false.

• 

This function is part of the ArrayTools package, so it can be used in the short form IsEqual(..) only after executing the command with(ArrayTools). However, it can always be accessed through the long form of the command by using ArrayTools[IsEqual](..).

Examples

withArrayTools:

a:=Array1,2,3,4

a:=1234

(1)

b:=Array1,2,3,4

b:=1234

(2)

c:=Array1,2,3,undefined

c:=123undefined

(3)

d:=Array1,2,3,undefined

d:=123undefined

(4)

IsEquala,b

true

(5)

IsEqualc,d

false

(6)

IsEqualc,d,equalundefined

true

(7)

See Also

ArrayTools,, ArrayTools[RandomArray], , ArrayTools[RegularArray], , ArrayTools[Size]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam