function Bito_like_prediction
proj=sbioloadproject('CaMK');
modelobj=proj.m1;
startTime=30;
stopTime=40;
times=0:0.01:stopTime;
frequencies=[2 3.3 5 6.7 10 20];
nFreq=length(frequencies);
maxSpikeNum= [10 20 30];
nSpi=length(maxSpikeNum);
max_step=0.005;
y=zeros(1,nFreq,nSpi);
output_species=[6 12 33];
configsetObj = getconfigset(modelobj);
set(configsetObj, 'StopTime', times(end));
set(configsetObj, 'SolverType','ode15s');
set(configsetObj.SolverOptions, 'OutputTimes', times);
set(configsetObj.SolverOptions, 'MaxStep', max_step);
set(configsetObj.SolverOptions, 'AbsoluteTolerance', 1.0e-8);
set(configsetObj.SolverOptions, 'RelativeTolerance', 1.0e-6);
set(configsetObj.RuntimeOptions, 'StatesToLog', 'all');
for ii=1:size(modelobj.species,1),
modelobj.species(ii).InitialAmount=0;
end
for ii=1:size(modelobj.Rules,1),
modelobj.Rules(ii).Active=1;
end
modelobj.species(1).InitialAmount=10000;
modelobj.species(6).InitialAmount=50;
modelobj.species(7).InitialAmount=4000;
modelobj.species(17).InitialAmount=20000;
modelobj.species(32).InitialAmount=5000;
modelobj.Rules(49).Active=1;
modelobj.Parameters(104).Value=startTime;
plot_counter=1;
for j=1:nSpi
for i=1:nFreq
modelobj.Rules(49).Active=1;
modelobj.Parameters(100).Value=frequencies(i);
modelobj.Parameters(107).Value=maxSpikeNum(j);
[t,y,names]=sbiosimulate(modelobj);
figure (1)
subplot(nSpi,nFreq,plot_counter)
plot(t(3000:end),y(3000:end,output_species))
legend(names{output_species(1)},names{output_species(2)}, names{output_species(3)})
title(['Frequency: ' num2str(frequencies(i)) 'Nr spikes: ' num2str(maxSpikeNum(j))]);
axis([30 40 0 15000])
plot_counter=plot_counter+1;
end
end
end
2 Comments
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/443691-creating-a-mesh-figure#comment_668692
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/443691-creating-a-mesh-figure#comment_668692
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/443691-creating-a-mesh-figure#comment_668699
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/443691-creating-a-mesh-figure#comment_668699
Sign in to comment.