function y = evaluateOutputCodeGen(t,x,u,data)

%   Author: R. Chen
%   Copyright 2022 The MathWorks, Inc.

%#codegen
outputfcn = str2func([data.FcnName '_OutputFcn']);
%% output network
if data.HasIdentityOutputFcn
   y = x;
else
   if data.HasInputs
      if data.IsTimeInvariant
         y = [x;outputfcn(x,u)];
      else
         y = [x;outputfcn(t,x,u)];
      end
   else
      if data.IsTimeInvariant
         y = [x;outputfcn(x)];
      else
         y = [x;outputfcn(t,x)];
      end
   end
end

