Hi, I want to perform subtraction on two cubic B splines and then project the difference on basis functions. ie. multiply the result by principal components matrix obtained from PCA performed on a group of curves. The problem is that the subtraction result in spline with different number of breaks and coefficients and therefore I can't multiply by the principal components matrix. I assume I need to delete breaks/knots (the opposite operation to 'fnrfn()') to force my new spline to the original number of breaks. How do I do that or does anyone have an alternative proposal?
my code looks something like: splineDiff = fncmb(meanBSpline,'-',proposedSpline); bNewProposed = PCoefs'*(reshape(splineDiff.coefs',1,)');
both meanBSpline and proposedSpline are pp structures with 30 pieces (1x31 breaks, 60x4 coefs, order 4, dim 2) However, the splineDiff is a pp structure with (on this instance - can vary) 59 pieces (1x60 breaks, 118x4 coefs, order 4, dim 2)) my principal component matrix PCoefs is a 240x18, so I need the reshaped coefs vector of spline Diff to be 240.
Any assistance will be much appreciated