Functions | |
endif | if (isvector(x)&&isvector(y)&&length(x)==length(y)) if(nargin |
elseif (ischar(opt)||iscell(opt)) i | |
else | error ("convhull: third argument must be a string or cell array of strings") |
endif else | error ("convhull: first two input arguments must be vectors of same size") |
H (1) | |
i (2)=0 | |
if (rem(next_idx, 2)==0) H(k) | |
i (next_idx-1)=0 | |
else | H (k) |
i (next_idx+1)=0 | |
endif endfor | H (n+1) |
!assert (convhull(x, y,{"s","Qci","Tcv","Pp"}),[1;7;13;12;11;10;4;3;2;1])%!demo%!x | |
!plot (x(k), y(k),'r-', x, y,'b+') | |
!axis ([-3.05, 3.05,-0.05, 1.05]) | |
Variables | |
function | H |
endif | n = rows (i) |
i = i'(:) | |
next_i = i(2) | |
for | k |
endfunction!testif HAVE_QHULL | !x = -3:0.5:3 |
!y = abs (sin (x)) | |
!k = convhull (x, y) |
!assert | ( | convhull(x, y,{"s","Qci","Tcv","Pp"}) | ) |
!axis | ( | ) |
elseif | ( | ischar(opt)||iscell(opt) | ) |
H | ( | 1 | ) |
i | ( | next_idx+ | 1 | ) | [pure virtual] |
i | ( | next_idx- | 1 | ) | [pure virtual] |
i | ( | 2 | ) | [pure virtual] |
if | ( | rem(next_idx, 2) | = =0 |
) |
endif if | ( | isvector(x)&&isvector(y)&&length(x) | = =length(y) |
) |
!k = convhull (x, y) |
endfunction !testif HAVE_QHULL !x = -3:0.5:3 |
!y = abs (sin (x)) |
i = i'(:) |
endif n = rows (i) |
next_i = i(2) |