Mercurial > octave-nkf
view examples/@polynomial/polynomial_superiorto.m @ 8256:dba0037e6602
Import new texinfo.tex allowing @ in directory name. Update OOP example class location
author | David Bateman <dbateman@free.fr> |
---|---|
date | Wed, 22 Oct 2008 04:16:36 +0100 |
parents | examples/polynomial/polynomial_superiorto.m@0c91b9a17dcf |
children | e07e93c04080 |
line wrap: on
line source
function p = polynomial (a) if (nargin == 0) p.poly = []; p = class (p, "polynomial"); elseif (nargin == 1) if (strcmp (class (a), "polynomial")) p = a; elseif (isvector (a) && isreal (a)) p.poly = a(:)'; p = class (p, "polynomial"); else error ("polynomial: expecting real or complex vector") endif else print_usage (); endif superiorto ("double"); endfunction