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

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