/usr/share/freemat/toolbox/funfun/deval.m is in freemat-data 4.0-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 | function SX=deval(SOL,X);
for i=1:length(X)
a=1; b=length(SOL.x); c=floor((a+b)/2);
while SOL.x(c)>X(i) | SOL.x(c+1)<X(i)
if SOL.x(c)>X(i) b=c; else a=c; end;
c=floor((a+b)/2);
end;
coeffs=feval(SOL.interpolant,SOL.y(:,c),SOL.y(:,c+1), ...
SOL.x(c+1)-SOL.x(c),shiftdim(SOL.idata.f3d(c+1,:,:),1));
s=(X(i)-SOL.x(c))/(SOL.x(c+1)-SOL.x(c));
SX(:,i)=SOL.y(:,c)+coeffs*cumprod(s(ones(size(coeffs,2),1),:));
end;
|