Use a kriging model built in uqlab as an executable function

Good morning all,
I have built a Kriging model using Uqlab.
So far I have the ability to evaluate the model using uq_evalModel from matlab.

My objective now is to evaluate this Kriging model from a larger c++ code (a Computational Fluid Dynamics solver).
I would like to use this kriging model as a kind of ‘‘stand alone’’ function, called by my c++ code.
I thought about compiling it with matlab tool mcc, but i struggle with the built in uqlab functions.

Do you any have any idea to work around this problem ?

Thanks by advance !
Cheers,
Elie

Dear Elie,

Instead of compiling the Matlab code you can try to directly call it from c++ using the Matlab Engine. Never tested that by my self but maybe it helps you.

https://ch.mathworks.com/help/matlab/matlab_external/call-matlab-functions-from-c-1.html

https://ch.mathworks.com/help/matlab/apiref/matlab.engine.matlabengine_cpp.html

Best regards,
Styfen