isequal
Determine whether dictionaries are equal.
📝Syntax
tf = isequal(d1, d2)
tf = isequal(d1, d2, ..., dN)
📥Input Arguments
Parameter Description
d1, d2, ..., dN dictionary objects to compare.
📤Output Arguments
Parameter Description
tf logical scalar: true when all dictionaries contain the same key-value associations.
📄Description

tf = isequal(d1, d2) returns true when both dictionaries have the same configuration and the same key-value associations.

Dictionary equality is independent of insertion order. If a key appears more than once during construction, only the last value kept by the dictionary is compared.

💡Examples
d1 = dictionary([1 2], ["one", "two"]);
d2 = dictionary([2 1], ["two", "one"]);
tf = isequal(d1, d2)
🔗See Also
dictionaryentriesisequal
🕔Version History
Version Description
2.0.0 dictionary classdef equality
Edit this page on GitHub