??? Error using ==> funfun\private\odearguments
错误时这样的:??? Error using ==> funfun\private\odearguments
Solving MODEL_HOFF requires an initial condition vector of length 10.
Error in ==> ode15s at 227
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, ...
Error in ==> IKK_optimal at 22
=ode15s(@model_hoff,tspan,Y01,[],par,Source);
代码如下:
%#####Optimal Experimental Design based on the Fisher Information Matrix####
%#####The NF-kB model with 10 states and 11 parameters######################
clc;
close all;
clear all;
format long;
parameters_hoff; % parametrization of ODE's and simulation times
IKK_normal=0.9;%the initial concentration of IKK;IKK is the initial N
para=;%the id of parameters analysed
for k=1:100
Y01(1)=IKK_normal*k/10;
IKK(k)=Y01(1);
tspan=;
=ode15s(@model_hoff,tspan,Y01,[],par,Source);
%%The local sensitivity analysis method is used to gain the absolute sensitivity matrix
error=10;%input gain value
disp('please wait......')
abso_s=[];%the absolute sensitivity matrix
%%the local sensitivity analysis using the infite difference method%%%%%%%%
for j=1:length(para)
i=para(j);
%parameter i is decreased with error%
par(i,1)=par(i,1)*(1-error/100);
%############ IKK on ####################################
=ode15s(@model_hoff,tspan,Y01,[],par,Source);
%parameter i is returned to its original value
par(i,1)=par(i,1)/(1-error/100);
%parameter i is increased with 1error%
par(i,1)=par(i,1)*(1+error/100);
%############ IKK on ####################################
=ode15s(@model_hoff,tspan,Y01,[],par,Source);
%parameter i is returned to its original value
par(i,1)=par(i,1)/(1+error/100);
%the absolute sensitivity S(i,j)=/(2*error%*p)
S=(Y2-Y1)/(2*par(i,1)*error/100);
abso_s=; %the absolute sensitivity matrix of the system output states x9 w.r.t the i-th parameter
end
relative_error=0.05;%the relative error of the measure value
absolute_error=0.001; %the absolute error of the measure value
cova_v=[]; %the error covariance matrix
v=[]; %the diagnoal elements of the error covariance matrix
for j=9
for i=1:max(size(Y))
sigma(:,i)=relative_error*Y(i,j)+absolute_error;
end
v=;
end
cova_v=diag(v.^2);
%the Fisher information matrix FIM
FIM=abso_s'*inv(cova_v)*abso_s;
=eig(FIM); %to calculate the eigenvalue of FIM
for j=1:length(para)
lambda(j)=lam(j,j); %the eigenvalue lamda of FIM
end
%Optimal experimental design w.r.t initial value of IKK
oed_a(k)=trace(inv(FIM)); %A-optimal criterion
oed_d(k)=det(FIM); %D-optimal criterion
oed_e(k)=min(lambda); %E-optimal criterion
oed_me(k)=max(lambda)/min(lambda);%Modified E-optimal criterion
end
请问怎么改? 谢谢!!
另外model-hoff程序如下:%#############10 states####################################################################
%y(1) E
%y(2) ES
%y(3) E*
%y(4) EQ
%y(5) ER
%y(6) S
%y(7) P
%y(8) N
%y(9) Q
%y(10)R
%########################################################################
%##############
function dy=model_hoff(t,y,par,Source)
dy=zeros(10,1);
y=zeros(10,1);
dy(1)=-par(1,1)*y(1)*y(6)+par(2,1)*y(2)+par(7,1)*y(4)-par(8,1)*y(1)*y(9)+par(11,1)*y(5);
dy(2)=par(1,1)*y(1)*y(6) - par(2,1)*y(2) - par(3,1)*y(2) + par(4,1)*y(3)*y(7);
dy(3)=par(3,1)*y(2) - par(4,1)*y(3)*y(7) - par(5,1)*y(3)*y(8) + par(6,1)*y(4) - par(9,1)*y(3) + par(10,1)*y(5);
dy(4)=par(5,1)*y(3)*y(8) - par(6,1)*y(4) - par(7,1)*y(4) + par(8,1)*y(1)*y(9);
dy(5)=par(9,1)*y(3) - par(10,1)*y(5) - par(11,1)*y(5);
dy(6)=-par(1,1)*y(1)*y(6) + par(2,1)*y(2);
dy(7)=par(3,1)*y(2) - par(4,1)*y(3)*y(7);
dy(8)=-par(5,1)*y(3)*y(8) + par(6,1)*y(4);
dy(9)=par(7,1)*y(4) - par(8,1)*y(1)*y(9);
dy(10)=par(11,1)*y(5);
%######################################################################################################
%######################################################################################################
楼上的,很多初始条件不设定,跟你的程序会很累的,比如 tspan=; %#ok<NBRAK> 回复 2 # tenglang 的帖子
我还有一个程序文件忘了上传抱歉!!希望你闲暇时帮我看一下%######################################################################################################
%######################################################################################################
num=600; %the number of sampling
%############## Simulation time points ##################################
t0=0; %time when IKK is being introduced into the system
tw=6000; %length of IKK stimulation
tau=(tw-t0)/num; %defines the period (in seconds) in between to successive data points
%############### Initial condition for total NF-kB ######################
y0=zeros(1,10); %Initial condition set to zero for each reaction participant
NF=0.9;
EF=1.5e-5;
SF=0.8;
y0(8)=NF; %NF-kB is given in cytoplasm
y0(1)=1.5e-5;
y0(6)=0.8;
Source=1;
%############### Parametrization for system of ODE's ####################
par=zeros(11,1);
par(1,1)=100000;
par(2,1)=1000;
par(3,1)=100;
par(4,1)=10000;
par(5,1)=50000;
par(6,1)=200;
par(7,1)=1000;
par(8,1)=20000;
par(9,1)=5000;
par(10,1)=100;
par(11,1)=500;
%######################################################################################################
%######################################################################################################
这不是前几天的问题又发了个贴... 怎LZ的帖都是这个样!?:@)
页:
[1]