马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
错误时这样的:
??? 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
[T,Y]=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=[3 4 5]; %the id of parameters analysed
- for k=1:100
-
- Y01(1)=IKK_normal*k/10;
-
- IKK(k)=Y01(1);
-
- tspan=[t0:tau:t0+tw];
-
- [T,Y]=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[0-100]
-
- 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 ####################################
- [T1,Y1]=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 ####################################
- [T2,Y2]=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)=[x(p+error%*p)-x(p-error%*p)]/(2*error%*p)
- S=(Y2-Y1)/(2*par(i,1)*error/100);
-
- abso_s=[abso_s S(:,9)]; %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=[v sigma];
- end
- cova_v=diag(v.^2);
-
- %the Fisher information matrix FIM
- FIM=abso_s'*inv(cova_v)*abso_s;
-
- [vec,lam]=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);
- %######################################################################################################
- %######################################################################################################
复制代码 |