view examples/@polynomial/get.m @ 15047:11c05ff73c83 gui

Document extra Qt dependencies
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Sun, 29 Jul 2012 01:31:20 -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