MATLAB: NEED HELP URGENTLY WITH COMPILE RUN ERROR

deep learninggenfunctionMATLAB and Simulink Student Suiteneural networkneural networks

Hi guys.
Why does this code not want to generate the function? The neural net runs perfectly, but I need to generate a MatrixOnly function for the C coder, and it wont compile? Any ideas? TIAMATLAB HELP NEEDED.jpg

Best Answer

Looking at your genFunction call:
genFunction(net,'C:\Users\27714\Desktop\Neural Network training\myNetwork.m', ...
'MatrixOnly');
the help text lists the following syntax:
genFunction(...,'MatrixOnly','yes')
Try adding in the 'yes' at the end of the call.
genFunction(net,'C:\Users\27714\Desktop\Neural Network training\myNetwork.m', ...
'MatrixOnly', 'yes');