How do I obtain a Simulink block for a neural network created in MATLAB code?

I have a NARX neural network which I have prepared and trained in MATLAB.
How do I obtain a Simulink block which behaves in the same way?

 Accepted Answer

You can use the 'gensim' function to generate the Simulink block. Please find more information about 'gensim' on the following page: 
You then need to set the neural network Simulink block initial conditions with 'setsiminit', as well as correctly configure the system. Please find more information about 'setsiminit' on the following page: 
If you notice discrepancies between the network in MATLAB and in Simulink, please check that the initial values are set properly in the Simulnk block using 'getsiminit'.
Refer to the attached script for a simple example on how to do so.

More Answers (0)

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!