I am trying to iterate a 'while loop' 1000 times and get 1000 values of my i. But my code keeps giving me just one value. Please, what am I doing wrong?
evidInteg1(1)= 0.6evidInteg2(1)= 0.6reactionTime= zeros(1,1000)i=1;numSimulation= 1000for trialNumber= 1:numSimulationwhile evidInteg1< threshold & evidInteg2>0 noise1= sqrt(dTime)*randn; noise2= sqrt(dTime)*randn; evidInteg1(i+1)= evidInteg1(i)+ dTime*(neuronActivity1 -neuronActivity2)+ noise1-noise2; evidInteg2(i+1)= evidInteg2(i)+ dTime*(neuronActivity2 -neuronActivity1)+ noise2-noise1; i=i+1;endreactionTime(trialNumber)= iend
Best Answer