While sumexpn can be called from any function in the toplevel directory, it is not possible to call the test functions or the demo without adding the private directory to the loadpath first.
$> demo private/sumexpn
private/sumexpn example 1:
function r = sumexpn_direct(a, n)
r = sum(cumprod([1 a./(1:n)]));
endfunction
a = 0.1:0.05:30;
n = 20;
d = zeros(size(a));
for idx=1:length(a)
d(idx) = sumexpn_direct(a(idx),n) - sumexpn(a(idx),n);
endfor
plot(a,d, ";sumexpn_direct - sumexpn;");
private/sumexpn example 1: failed
'sumexpn' undefined near line 9, column 39
While sumexpn can be called from any function in the toplevel directory, it is not possible to call the test functions or the demo without adding the private directory to the loadpath first.