Use nnstart instead of nntool ("nntool is no longer recommended").
Within nnstart you can choose your tool (nftool, nprtool, nctool, ntstool) depending on your task. With these tools you can can configure your net and data similarily to nntool. The last page of these tools provides (after training) the possibility to generate a Matlab-script (Usually I use the "advanced script"). You can also load example datasets (implemented in the tools) where training time is only a few seconds.
In my opinion, the automatically generated script is a good start point and can easily be adapted e.g. integrated within a loop which varies the number of neurones.