MATLAB: Neural network function ‘sim’ does not work in standalone application

nerual network standlone

Hi, dear all. Recently, I’m working on develop a GUI user interface and to compile the code into the PC standalone application.
In the model, I incorporated an ensemble of artificial neural network. The network has been trained and save in a mat file. Every time, I just use function 'sim' to run neural network with my input data. topENN here is where I save my trained network, lifet here is my input.
for ii = 1:82 %runs 82 networks.
mlpnet = topENN{1,ii}; %pulls parameters for the networks
A=sim(mlpnet, lifet');% run NN simulation
[temp, classid]=max(A);
temp2(:,ii) = classid';
end
All the codes work well in Matlab environment, but when we compile them into standalone application; it seems that the neural network toolbox cannot be complied into the standalone application.
I have no idea how to make my executive application works, really need someone who experience this help me out. Hope hears you soon. Thanks!!!!!
Nan

Best Answer

Saved networks can be used in a standalone application.
What happens when you try? Is there an error message?
When compiling NN toolbox, it is common to need to use a %#function pragma in order to force inclusion of some routines that are not directly referenced.