Main Content

isequal

Test DataMatrix objects for equality

Syntax

TF = isequal(DMObj1, DMObj2)
TF = isequal(DMObj1, DMObj2, DMObj3, ...)

Input Arguments

DMObj1, DMObj2, DMObj3DataMatrix objects, such as created by DataMatrix (object constructor).

Output Arguments

TFLogical value indicating if inputs are numerically equal (have the same contents), have the same size (same NRows and NCols properties), and have the same RowNames and ColNames properties. NaNs are not considered equal to each other.

Description

TF = isequal(DMObj1, DMObj2) returns logical 1 (true) if the input DataMatrix objects, DMObj1 and DMObj2, meet the following:

  • Are numerically equal (have the same contents)

  • Have the same size (same NRows and NCols properties)

  • Have the same RowNames and ColNames properties

Otherwise, it returns logical 0 (false). DMObj1 and DMObj2 do not have to have the same Name property. NaNs are not considered equal to each other.

TF = isequal(DMObj1, DMObj2, DMObj3, ...) returns logical 1 (true) if all input DataMatrix objects, DMObj1, DMObj2, DMObj3, etc. meet the following:

  • Are numerically equal (have the same contents)

  • Have the same size (same NRows and NCols properties)

  • Have the same RowNames and ColNames properties

Otherwise, it returns logical 0 (false). The input DataMatrix objects do not have to have the same Name property. NaNs are not considered equal to each other.

Version History

Introduced in R2008b