matthiasm@8: function A = assocarray(keys, vals) matthiasm@8: % ASSOCARRAY Make an associative array matthiasm@8: % function A = assocarray(keys, vals) matthiasm@8: % matthiasm@8: % keys{i} is the i'th string, vals{i} is the i'th value. matthiasm@8: % After construction, A('foo') will return the value associated with foo. matthiasm@8: matthiasm@8: A.keys = keys; matthiasm@8: A.vals = vals; matthiasm@8: A = class(A, 'assocarray');