view examples/@polynomial/polynomial_superiorto.m @ 8710:739141cde75a ss-3-1-52

fix typo in Array-f.cc
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 09 Feb 2009 21:51:31 +0100
parents e07e93c04080
children 567e3e4ab74d
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