Generating an m-file from a simulink model for neural networks
조회 수: 4 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Michael
2011년 3월 3일
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
anumukonda sai himaja
2016년 3월 2일
please let me know how to view code for a network developed using nntool ??
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!