Generating an m-file from a simulink model for neural networks
2 views (last 30 days)
Show older comments
I was wondeing if it is possible to generate an m-file from a simulink model to allow me edit the code using the text editor. The reason that I would like to do this is generate an m-file of a neural network and it was suggested to me to generate a simulink model and from that generate the m-file however there does not appear to be any straightforward method of doing this. If anyone knows a way of generating an m-file of a neural network in the toolbox that would be great as well, I know that when making a network using the GUIs that go through a step-by-step process it is very easy however I am not sure what to do when using nntool. Any help would be very much appreciated.
Thank you
0 Comments
Answers (1)
Michael
on 3 Mar 2011
André, as I understand you are looking for a way to generate a MATLAB file from a neural network. You can save the trained network to a .mat file, but it's not possible to actually generate MATLAB code from the network.
A network is like a black box. It has been trained to perform a certain task, but it can not recover training data nor describe all the necessary training steps it went through once. Simple comparison - I know how to play the piano (more or less) but it's not possible for me to write down a recipe on a piece of paper to enable someone else to play the piano in the exact same way I do, by simply reading my script of instructions.
If you are using a graphical design workflow to perform Clustering (>>nctool), Fitting (>>nftool) or Pattern Recognition (>>nprtool) you may want to capture all the design steps you performed by generating a MATLAB file from the 'Save Results' pane of those GUIs.
Hope this helps,
-Michael
2 Comments
anumukonda sai himaja
on 2 Mar 2016
please let me know how to view code for a network developed using nntool ??
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!