Is there any way to do i.e.
Surface = scatteredInterpolant(measurement_xz(:,1)*1E-3,measurement_xz(:,2)*1E-3,measurement_xz(:,3));
where measurement_xz
is some data in a startup script for my simulink model and then use Surface
in an embedded matlab function in the simulink model, i.e.
///embedded matlab function
function V = fcn(x,z)
V = Surface(x,z);
?
When I i.e. try to use Surface
as a parameter for V
like
function V = fcn(x,z,Surface)
V = Surface(x,z);
with Surface
set as parameter in the Ports and data manager I get the error
Expression 'Surface' for initial value of data 'Surface' must evaluate to a numeric or logical.