lookupTable

バージョン 1.0.0.0 (935 Bytes) 作成者: Dan Cohn
Creates a lookup table for a collection of key/value pairs
ダウンロード: 1.5K
更新 2008/3/31

ライセンスがありません

Creates a lookup table for a collection of key/value pairs. Keys can be ANY data-type (although indexing over function handles might produce unexpected/incorrect behavior)

Examples:

weatherStruct = struct('clouds','rain','windy','cold');
obj = weatherObject(weatherStruct,...);
tbl = lookupTable('today''s weather', weatherStruct,obj,'found weather obj',0.0123,'random data here');

A = tbl('today''s weather')
= weatherStruct

A = tbl(obj)
= 'found weather obj'

A = tbl(0.0123)
= 'random data here'

k = tbl.key(1) %equal to first element of key
= 'today''s weather'

v = tbl.value(2) %equal to second element of value
= 'found weather obj'

key = tbl.contents('-key')
= {'today''s weather',obj,123}

value = tbl.contents('-value')
= {weatherStruct,'found weather obj','random data here'}

引用

Dan Cohn (2026). lookupTable (https://jp.mathworks.com/matlabcentral/fileexchange/19381-lookuptable), MATLAB Central File Exchange. 取得日: .

MATLAB リリースの互換性
作成: R2008a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
謝辞

ヒントを与えたファイル: dict

バージョン 公開済み リリース ノート
1.0.0.0

Improved function help and code readability