Hi,

I have frequently bumped into this issue which I am not sure why and I would like to have some advise on what can be the issue and how can I solve them. I have two models, one is a simpler with 5 parameter uncertainty and the other one with 8 parameters.

My issue that I am facing is that I have been running the different methods to obtain the PCE coefficients. When I ran for the simpler model, it does seem to work. But then when I ran again, the methods such as the OMP and OLS were not working. I get error message such as this below but then it did work at another time which was weird. So for now only the LARS, SP and BCS is working to produce results for this model:

**Matrix dimensions must agree.**

**Error in uq_omp (line 153)**

** h = abs(r’.*PsiNorm);**

**Error in uq_PCE_omp (line 52)**

**omp_results = uq_omp(Psi, Y, omp_options);**

**Error in uq_PCE_calculate_coefficients_regression (line 218)**

** omp_results = uq_PCE_omp(univ_p_val, current_model);**

**Error in uq_PCE_calculate_coefficients (line 47)**

** uq_PCE_calculate_coefficients_regression(current_model);**

**Error in uq_calculateMetamodel (line 18)**

** success = uq_PCE_calculate_coefficients(current_model);**

**Error in uq_initialize_uq_metamodel (line 362)**

**success = uq_calculateMetamodel(current_model);**

**Error in AbsXXX_PCEtest (line 235)**

**myPCE_OMP = uq_createModel(MetaOpts);**

But then, when I ran for the complex model, all the methods does not seem to work (OLS, OMP, LARS, SP, BCS) and I get error messages quite similar with each methods such as below:

**Incorrect dimensions for matrix multiplication. Check that the number of columns**

**in the first matrix matches the number of rows in the second matrix. To perform**

**elementwise multiplication, use ‘.*’.**

**Error in uq_lar (line 231)**

** cj = Psi’*(Y - mu);**

**Error in uq_PCE_lars (line 64)**

**lar_results = uq_lar(Psi, Y, lar_options);**

**Error in uq_PCE_calculate_coefficients_regression (line 197)**

** lars_results = uq_PCE_lars(univ_p_val, current_model);**

**Error in uq_PCE_calculate_coefficients (line 47)**

** uq_PCE_calculate_coefficients_regression(current_model);**

**Error in uq_calculateMetamodel (line 18)**

** success = uq_PCE_calculate_coefficients(current_model);**

**Error in uq_initialize_uq_metamodel (line 362)**

**success = uq_calculateMetamodel(current_model);**

**Error in Abs_XX_DistributionRun (line 158)**

**myPCE_sparse = uq_createModel(MetaOpts);**

I am quite confused to why some methods are working at some times and some are not working at all. Can you guys help me out for this problem?

Thanks!

Best regards,

Visha