matlab - Error: "Index exceeds matrix dimensions" -


the following code works when run on own:

range = multi_sptime(100,end); binary_input = binary_input2(1:range); ssignal = signal(1:range); signal = ssignal;% input current clear input2  clear binary_input2 dbstop if error 

however, when add for loop:

neurons=[1,2,4,6,8,10,15,20,25,30,35,40,50,100,200]; ncell=neurons ... 

i error below:

??? index exceeds matrix dimensions.
error in int_idc20 (line 8)
ssignal = signal(1:range);

how fix , what's going on?

first, think wanted loop on # of elements in neurons , correct for line with:

for ncell=1:numel(neurons) 

and depending on want use ncell or neurons(ncell) in loop.

second, range scalar looks multi_sptime row # 100 last element, , apparently number spits larger # of elements signal. try size(signal) see have.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -