MATLAB: How to use an M-by-N matrix input or an M-by-N matrix target in the NNTOOL GUI from the Neural Network Toolbox

Deep Learning Toolboxinputmultiplenntooltarget

I would like to use an M-by-N matrix input or an M-by-N matrix target in the NNTOOL GUI with the Neural Network Toolbox.

Best Answer

The following example demonstrates how to do this.
At the MATLAB command prompt, type:
PNEW=rand(11,45); %You have 11 inputs to your network
TNEW=rand(5,45);% You have 5 targets to your network
nntool %starts the Neural Network gui
In the Neural Network GUI:
1. Import the data PNEW as 'Inputs' and TNEW as 'Targets' by using the Import button.
2. Create a new Network with the following information:
Network Type: Feed-Forward backprop
Input ranges: select PNEW from the dropdown menu
Training Function: TRAINLM
Adaption learning function: LEARNGDM
Performance function: MSE
Number of Layers: 2
For the Properties of Layer 2, the number of neurons should be 5. The transfer function can be TANSIG.
3. Click on View for the network you created.
4. In the Training Info under the Train tab, select the Inputs as PNEW and Targets are TNEW
5. Click on 'Train Network'