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...