When using the output of an extrinsic function, it may often be necessary to preinitialize the variable to which it is assigned. Doing so is what tells the code generation software about the type, size and complexity of the value returned. If foo is extrinsic, then you could use:
x = zeros(3,4);
x = foo(y);
to call foo extrinsically and assign the output as a 3-by-4 array. See:
http://www.mathworks.com/help/simulink/ug/calling-matlab-functions.html#bq1h2z9-47 http://www.mathworks.com/matlabcentral/answers/122167-subscripting-into-an-mxarray-is-not-supported
for more details.
In your case you can do an assignment:
% Assign Prob the right, size, type, complexity for Coder
Prob = zeros(m,n,k,...);
Prob = softmax(terms);
That will allow you to treat Prob as any other MATLAB variable again.
Best,
Ryan
"Tan Biru" wrote in message <lu2jr3$2ba$
1...@newscl01ah.mathworks.com>...