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 » Thu Jul 06, 2006 8:26 pm

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 » Sat Jul 08, 2006 11:11 am

Hi!

I forget to say, i use WinXp, and MatLab 6.5

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Post by hines » Tue Jul 11, 2006 8:51 am

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: 5
Joined: Thu Sep 05, 2019 11:53 am

Re: matlab-neuron

Post by bdut » Sat Sep 21, 2019 1:44 am

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