how to get refractory period in neuron of long vector 1*1500000 as [0 1]?

5 Ansichten (letzte 30 Tage)
function [stim_order,elements,v]= myfunction()
x=randn(1,5000);%plot(x);
cut_off_freq=125;
SR=5000; %sampling rate
[A,B]=butter(4,cut_off_freq/(SR/2),'low');
filtered_signal=filtfilt(A,B,x);
rest(1:5000)=0;
x1=[rest,(filtered_signal*4)];
x2=[rest,(filtered_signal*6)];
x3=[rest,(filtered_signal*8)];
elements = {x1,x2,x3};
for i = 1:50;
%random_order(:,i)=elements(randperm(length(elements)));
random_order=randperm(length(elements));
%stim_order(:,i)=randperm(length(elements));
stim_order(i,:)=elements(random_order);
order(i,:)=random_order;
end
z=order(:)';%:-cell columns
y=cell2mat(stim_order');
v=reshape(y',1,numel(y));%v-stimulation parameter
%v=double(v);
plot(v);
a=1;%represents the saturation value
b=-2.5;%b-offset of the curve
c=0.35;%c-slope,
t=-(v+b)/c; %v-stimulation parameter
prob=a./(1+exp(t));%probability of response
plot(v,prob,'.');
xlabel('stimulation');ylabel('response');
ranvector=rand(1,1500000);
response_noresponse=(prob>ranvector);
plot(response_noresponse)
for example long vector contains [0 0 0 1 1 1 0 0 1 0 1 0 1 1] I want every after fifth element has to be consider even if its 0 or 1
please help me
  2 Kommentare
arunkumar Mohanraj
arunkumar Mohanraj am 28 Mär. 2016
refractory period- neuron never fire continuously. but in my long vector I'm getting sometimes continuous response of the neuron. so I want every fifth elements should be consider. because neurons never been in saturation level for long million seconds.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 28 Mär. 2016
v=[0 0 0 1 1 1 0 0 1 0 1 0 1 1]
idx=v(5:5:end)
  1 Kommentar
arunkumar Mohanraj
arunkumar Mohanraj am 28 Mär. 2016
Bearbeitet: Walter Roberson am 28 Mär. 2016
thank you for your effort, but I am not looking just to extract the value. my vector length is shrinks with your idea. I following idea is works. i want to learn different idea rather than true or false statement
i=1;
position=[];
while i <= length(true_false)
if true_false(i)==1
positions=[positions i];
i=i+5;
else
i=i+1;
end
end

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Neural Simulation finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by