matlab-neuron

The basics of how to develop, test, and use models.
Post Reply
thats_karlo
Posts: 108
Joined: Thu Sep 08, 2005 11:49 am

matlab-neuron

Post by thats_karlo »

Hi!

Can we make any connection from NEURON to MatLab. say, use matlab command in a *.hoc file?

Karlo
thats_karlo
Posts: 108
Joined: Thu Sep 08, 2005 11:49 am

Post by thats_karlo »

Hi!

I forget to say, i use WinXp, and MatLab 6.5
hines
Site Admin
Posts: 1603
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

It is simpler if you can turn things around and have Matlab control NEURON. I presume Matlab can interact with a process via stdin/stdout and you would start NEURON with the string
nrniv -nogui -isatty

But if your project is conceptually simpler with Matlab controlled by NEURON then
you can have NEURON load the Java Virtual Machine (but you would need Java installed) and see c:/nrn59/lib/nrn.def with respect to telling NEURON where the JVM is. Then you can use the POpen.java, popen.hoc example as the idiom for launching a process that NEURON can communicate with through the processes stdin/stdout. If you decide to use the Java method, then send me an email and I'll give you the popen.zip file with the code.
bdut
Posts: 10
Joined: Thu Sep 05, 2019 11:53 am

Re: matlab-neuron

Post by bdut »

Hello,

Adding to this thread, is there a way to call a Matlab user-defined function from .mod/ .hoc file? I am working on Neuron 7.7.2 and Matlab2019.

Thank you
Post Reply