I create function of TriScatteredInterp 'name of AFUNCTION' in MATLAB.
But my program is basically based on simulink. so, I wanna call this TriScatteredInterp function by embedded MATLAB Function icon. Thus, I make
=======================
function y = fcn(u1,u2)
%#eml
eml.extrinsic('AFUNCTION');
y = feval('AFUNCTION',u1,u2);
=============================
But there is an error message. 'Function output 'y' cannot be of MATLAB type' I've learned about this output type so if output type is a double, I can correct this problem by adding y=0; (y is scalar of type double)
then what can I correct the problem about the value of TriScatteredInterp?
y = feval('AFUNCTION',u1,u2) has an output A type of TriScatteredInterp
Best Answer