view examples/@polynomial/get.m @ 16651:4e50bd2946d8 ss-3-7-4

snapshot 3.7.4 * configure.ac (OCTAVE_VERSION): Bump to 3.7.4.
author John W. Eaton <jwe@octave.org>
date Mon, 13 May 2013 08:07:15 -0400
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