matlabnntool

Why does the GUI of Matlab's nntraintool still show although net.trainParam.showWindow = 0?


I came across this issue when I tried to suppress the GUI called by train() following this answer:

http://www.mathworks.com/matlabcentral/answers/81073-how-to-close-nntrain-tool

So right after creating my net I disabled the GUI:

net = narxnet(...) net.trainParam.showWindow = 0;

Unfortunately, it would still pop up! Why?


Solution

  • Tracking the variable's behaviour shows that it remains (while setting data division etc. following one of the automatically produced scripts provided by nntool) 0 until

    net.trainFcn = 'trainlm';

    is called which changes net.trainParam.showWindow's value back to 1. Therefore, in order to make sure that the GUI does not pop up setting this variable to 0 should happen right before train() is called.