types
Types of dictionary keys and values.
Syntax
- [keyType, valueType] = types(d)
- keyType = types(d)
Input argument
- d - scalar: dictionary object.
Output argument
- keyType - string scalar: Data type of dictionary keys.
- valueType - string scalar: Data type of dictionary values.
Description
keyType = types(d) returns the data type of the keys in the dictionary.
[keyType, valueType] = types(d) returns the data types of the keys and values in the specified dictionary. If the dictionary d is not configured, types returns a string scalar indicating missing.
Example
names = ["Biil" "John" "Yann"];
wheels = [1 2 3];
d = dictionary(wheels, names)
[keyType, valueType] = types(d)
See also
dictionary, keys, values.
History
Version | Description |
---|---|
1.5.0 | initial version |
Author
Allan CORNET