isKey
Check if dictionary contains key
📝Syntax
tf = isKey(d)
📥Input Arguments
Parameter Description
d scalar: dictionary object.
📤Output Arguments
Parameter Description
tf scalar logical: true if key, false if not.
📄Description

tf = isKey(d, key) returns a logical true if the specified key exists in the configured dictionary, and a logical false if it does not.

If d is an unconfigured dictionary, isKey throws an error.

If key is an array of multiple keys, then tf is a logical array of the same size.

💡Examples
names = ["Biil" "John" "Yann"];
wheels = [1 2 3];
d = dictionary(wheels, names)
tf = isKey(d, "John")
tf = isKey(d, ["biil" , "Yannis")
🔗See Also
dictionaryconfigureDictionarykeys
🕔Version History
Version Description
1.5.0 initial version
Edit this page on GitHub