mcdougallab / matlabneuroninterface

Interface for connecting NEURON and MATLAB
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Faster way to convert clib.neuron.Double array to matlab double #86

Closed edovanveen closed 10 months ago

edovanveen commented 10 months ago

Closes #79, closes #78

edovanveen commented 10 months ago

@ramcdougal could you test if these issues are fixed with this pull request?

ramcdougal commented 10 months ago

This makes a dramatic improvement to:

n = neuron.Neuron();
n.load_file("stdrun.hoc");
axon = n.Section("axon");
v = n.Vector();
n.finitialize(-65);
v.record(n.ref("t"));
n.finitialize(-65);
n.continuerun(100000);
plot(v,v);

with the change, the plot of 4 million points appears after a brief moment... I never had the patience to wait for it in the previous version, but it would take at least minutes.