From: matlaberboy on
B-splines are zero outside their support, any function in B-form is zero outside the basic interval of its form. This is very much in contrast to a function in ppform whose values outside the basic interval of the form are given by the extension of its leftmost, respectively rightmost, polynomial piece.

I have a pp form spline. When I evaluate that spline outside its boundaries the arformentioned behavior occurs. I would like to make fnval with pp behave like it does for B-splines.

Can anyone help?

I would have thought this sort of thing would have worked but it doesnt:

function dataOut = fnval2(mySpline, dataIn)

if(strcmpi(mySpline.form, 'pp'))

myMin = min(mySpline.breaks);
myMax = max(mySpline.breaks);

idxMIN = find(dataIn < myMin);
idxMAX = find(dataIn > myMax);

dataOut = fnval(mySpline, dataIn);

dataOut(idxMIN) = 0;
dataOut(idxMAX) = 0;

elseif(strcmpi(mySpline.form, 'B-') || strcmpi(mySpline.form, 'B'))


dataOut = fnval(mySpline, dataIn);

else
error('Spline type not recognized')
end


end

Thank You!!
From: matlaberboy on
solved: doc fn2fm