Errors in retrieving the m-file handle for a developed PCE metamodel

Dear @Abraham

Yes, it is possible. If you want to have the model as m-file, you have to wrap the model in a function with the following signature, as described in the manual:

function Y = myPCE_sparseLARS(X)
    Y = uq_evalModel(myModel, X);
end

Of course, in this case myModel must be visible within the function scope. For example, you can load a saved model, create the model, or use a model from the workspace.

Alternatively, you can provide the model as a function handle as follows:

ModelOpts.mHandle = @(X) uq_evalModel(myModel, X)

Best regards
Styfen

1 Like