calcMFPCA function

Internal function that implements the MFPCA algorithm for given univariate decompositions