Thanks for the clarification. Then it is quite simple!
You can define the model uncertainty variable altogether with the other inputs in your INPUT object. Say it is now the last component N, as in:
iOpts.Marginals(N).Moments = [1.2 0.18]; % I assume the parameters you mention above are moments.
If you have already wrapped your finite element model into UQLab (manually or using UQLink), you must have a MODEL object, say
myUQLinkFEModel (obtained using
uq_createModel(mOpts)). Note that it should run as before, even with this new INPUT: simply, the model uncertainty variable
myInput.Marginals(N) now plays the role of a dummy variable (i.e. it is not used) in
You can now create a second MODEL:
mOpts.mFile = 'myModel_WithModelUncertainty';
where the associated m-file looks like:
function Y = myModel_WithModelUncertainty(X)
% Runs the finite element model with input parameters X(1:N-1),
% and multiply the result with model uncertainty contained in X(N)
% NB: this code could be easily vectorized
% Run the finite element model as before
Y_FE = uq_evalModel(myUQLinkFEModel,X);
% Multiply by the model uncertainty
Y = Y_FE * X(N);
Then you can do whatever you want with the new MODEL
myModel_WithModelUncertainty, including AKMCS. I hope this makes sense.