Hi,
I wanted to run a neuron simulation from MATLAB, which I did with the command "!nrngui <file.hoc>". Later I wanted to calculate spikes with APCount procedure in NEURON and return it to MATLAB variable for further computation. One way is to create file, store value into it and open it in MATLAB. Since this needs extra file operations, is there any other way I can access the spike count in MATLAB directly from NEURON (like assigning to a local variable in MATLAB).
Thank you.
Accessing neuron variables in MATLAB
-
- Posts: 70
- Joined: Wed Jan 18, 2012 12:25 am
- Location: University of Pavia
Re: Accessing neuron variables in MATLAB
You can setup communication with NEURON using stdin and stdout (string buffers) in Matlab. I have implemented some code which does this on github. The code has a lot more functionality and is still growing and changing but the basics are there.
https://github.com/JimHokanson/matlab_NEURON
Setup takes a minute or two but then you can send messages back and forth to NEURON.
https://github.com/JimHokanson/matlab_NEURON
Setup takes a minute or two but then you can send messages back and forth to NEURON.