Unable to Perform Inversion

Hi there,

I am stuck on an error I do not seem to know how to resolve. I have

  1. Gone through all the tutorial files on the inversion module
  2. Now gone ahead to set up my own case, which I wanted to run.

I however keep getting an error:
Starting Adaptive Metropolis…
something went extremely wrong while trying to evaluate the analysis
You may find additional information in the catched exeption:
Unable to perform assignment because the size of the left side is 10-by-151 and the size of the right side is 1-by-151.

Error in uq_inversion_likelihood (line 62)
modelRunsCurr(:,ModelIDCurr == jj) = forwardModel(jj).evaluation(:,OutputIDCurrModel);

Error in uq_initialize_uq_inversion>@(x)uq_inversion_likelihood(x,Internal,‘LogLikelihood’) (line 459)
Internal.LogLikelihood = @(x) uq_inversion_likelihood(x,Internal,‘LogLikelihood’);

Error in uq_AM (line 65)
[logLKLHD_Curr, forwardModel_Curr] = LogLikelihood(reshape(Seed,nDim,nChains)’);

Error in uq_inversion (line 64)
Results.LogLikeliEval] = uq_AM(…

Error in uq_initialize_uq_inversion (line 708)
uq_runAnalysis(CurrentAnalysis);

Error in pEstimate_zpg_plate (line 79)
myBayesianAnalysis = uq_createAnalysis(BayesOpts);

I am aware that even though I have one observation (with it’s discrepancy available to me), I should be able to specify it as a 1 x Nx vector (Nx = number of points in space, which in my case is 151). I have tried to go through the errors line by line to figure out what else could be the problem, but nothing is coming to me to fix this. I have checked that my forward model only produces a row vector. This also happens with the default BayesOpts struct settings (becomes 100x151). I will attach a snippet of the code which generates the error. err3

Hi @Uche_A

I don’t see any obvious issues with your code right away. Could you possibly provide the file so that I may have a look at your example?

As a note for future posts: Please use the code formatting options available on UQWorld. This makes your posts search- and selectable. So, instead of posting a screenshot of your MATLAB script, paste the code directly like:

%% provide measurements - for now we are treating as one at a time
obsData.Name = 'non-modelled Source Term'

Or with fancy code highlighting:

%% provide measurements - for now we are treating as one at a time
obsData.Name = 'non-modelled Source Term'
1 Like