% -------------- MaxAbsFSpline.m ----------------- % % function [M] = MaxAbsFSpline(func,xc,yc,s,pts) % % evaluates the function 'func' at pts points along the 2d spline % given by xc,yc,s and returns the maximum absolute value. % function [M] = MaxAbsFSpline(func,xc,yc,s,pts) n = length(s); s0 = s(1):(s(n)-s(1))/pts:s(n); x0 = EvalSpline(xc,s,s0); y0 = EvalSpline(yc,s,s0); f = eval([func,'(x0,y0)']); M = max(abs(f));