Skip to content
Snippets Groups Projects
subsref.m 306 B
Newer Older
function val = subsref(hash,index)

  case '()'
    if (length(index.subs) ~= 1)
      error('Only single indexing is supported.');
    end
    val = get(hash,index.subs{1});
  case '.'
    val = get(hash,index.subs);
  otherwise
    error('Invalid type.')
end