Mercurial > octave-nkf
diff examples/polynomial/end.m @ 8223:0c91b9a17dcf
Commit missing files from previous change
author | David Bateman <dbateman@free.fr> |
---|---|
date | Thu, 16 Oct 2008 09:20:58 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/polynomial/end.m Thu Oct 16 09:20:58 2008 +0100 @@ -0,0 +1,11 @@ +function r = end (obj, index_pos, num_indices) + dv = size (obj.x); + for i = (num_indices + 1) : length (dv) + dv(num_indices) *= dv(i); + endfor + if (index_pos <= length (dv)) + r = dv (index_pos); + elseif + r = 1; + endif +endfunction