First a comment: in most cases it is easy to construct a program for NEURON in such a way that a family of simulations can be generated without having to exit NEURON after each run and restart it before each parameter change (this can save a lot of time if model setup is a significant fraction of the time required to execute a single run), let alone rely on a shell script or some other program such as Matlab to control which parameter set is used in which run.
This
seems like a strange way to launch NEURON and get it to execute the contents of myFile.hoc. For one thing, it seems unlikely to be portable across operating systems, but then I don't know much about Matlab, and I have no idea what fullfile(...) is actually doing. Under OS X or Linux, and without the benefit of Matlab, one would ordinarily do
nrngui myFile.hoc
and if that caused the NeuronMainMenu toolbar to appear and one wanted to prevent that,
nrngui -nogui myFile.hoc
would suffice. This would also work under Windows if one were running NEURON from its bash window (see the bash icon in the NEURON program group and in the NEURON folder that is placed on your Desktop when you install NEURON).
If you absolutely have to stick with Matlab and system(fullfile(cd,'myFile.hoc')), then you might try editing myFile.hoc to replace every occurrence of
with
Code: Select all
// load_file("nrngui.hoc")
load_file("stdgui.hoc")
But of course the next time you want the toolbar to appear, you'll have to go back and undo those edits.