view examples/@polynomial/get.m @ 14205:fe2ace7a35da stable

Added tag release-3.6.0 for changeset 704f7895eef0
author John W. Eaton <jwe@octave.org>
date Sun, 15 Jan 2012 14:56:37 -0500
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