view examples/@polynomial/end.m @ 9288:7621f0b0e588

examples/@polynomial/end.m: Fix end for zero based indexing.
author Robert T. Short <rtshort@ieee.org>
date Tue, 02 Jun 2009 20:56:19 -0700
parents 226f6d001ee2
children 446c46af4b42
line wrap: on
line source

function r = end (obj, index_pos, num_indices)

  if (num_indices != 1)
    error ("polynomial object may only have one index")
  endif
  
  r = length (obj.poly) - 1;

endfunction