insert
说明
示例
输入参数
提示
字典按元素将键映射到值,从而支持向量化查找和插入。键和值必须由相同或彼此兼容的数据类型的元素组成。要存储非标量或异构值,请使用元胞数组。
例如,要将表作为值插入字典中:
d = dictionary(); t1 = table(1,2); t2 = table(1,2,3); d(["table1" "table2"]) = {t1,t2}
d = dictionary (string ⟼ cell) with 2 entries: "table1" ⟼ {1×2 table} "table2" ⟼ {1×3 table}