Failure to recognize the parameter when evaluating model

截屏2021-02-24 上午1.19.53
These are my code creating model, and try to evaluate it, but the X can not be recognized

Hi @Jeremie,

Welcome to UQWorld!

What is the actual error message and is there actually any X in the current MATLAB workspace?

No there is no X in the workspace. I created a input file to input number into a main code, and a inp.tpl file with , in it. Then the error says cannot recognize variable X.

The variable X as an input to uq_evalModel has to be available in the current workspace (be it the main or a function workspace) before you can call the function; otherwise UQLab (well, in this case, MATLAB) won’t know what X means. The function evaluates the model on actual input points (arrays), so calling uq_evalModel(X) means evaluate the points stored in variable X.

The template (*.inp.tpl) file in UQLink model is used as the basis for creating an actual input for your external model. The markers inside the template file will be substituted with the actual numbers from X when uq_evalModel is called. Again, the variable X and the numbers inside have to be defined first.

I hope this helps!