Running Neuron from MATLAB or COMSOL

Post Reply
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Running Neuron from MATLAB or COMSOL

Post by ted »

skos wrote:Right now, I use the command

dos('C:\nrn71\bin\nrniv.exe Model.hoc') from the directory that our model and suppporting files are in. I just got this working the other day, and it's definitely a step up from having MATLAB pause until a user manually runs the next neuron simulation, which is what was being done previously. However, I can't seem to get this command to run in an actual Neuron window. Instead, it just opens an empty command prompt with the title 'C:\nrn71\bin\nrniv.exe Model.hoc', and then dumps the entire Neuron output back to COMSOL for display after the entire simulation has been completed.

While this does run the simulation, we have a lot of intermediary outputs to the screen that we could previously see while running the files manually in a nrniv window. Is there any way for me to get Neuron to run in its own window and display output in real-time, rather than running in the command prompt and just dumping the full output after the trial is complete?
The notion of batch runs with "real time output" seems like a contradiction in terms to me. Generally one wants to see output as it is being generated during development and debugging, but abandons this during "production runs" because writing to the screen slows things down.

But if that's what you want to do, so be it.

Try inserting
load_file("nrngui.hoc")
as the first statement in your hoc file, and see if that doesn't take care of it.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Running Neuron from MATLAB or COMSOL

Post by ted »

What happens if your command line is

Code: Select all

C:\nrn71\bin\nrniv.exe Model.hoc -
i.e. just add a hyphen after the name of the hoc file
?
Post Reply