view examples/@polynomial/get.m @ 14300:d1c45dd1a038 gui

Readded .hgsub.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Tue, 31 Jan 2012 21:32:43 +0100
parents 567e3e4ab74d
children
line wrap: on
line source

function s = get (p, f)
  if (nargin == 1)
    s.poly = p.poly;
  elseif (nargin == 2)
    if (ischar (f))
      switch (f)
        case "poly"
          s = p.poly;
        otherwise
          error ("get: invalid property %s", f);
      endswitch
    else
      error ("get: expecting the property to be a string");
    endif
  else
    print_usage ();
  endif
endfunction