Académique Documents
Professionnel Documents
Culture Documents
clear; clg;
% Notatii:
% n= nr. incremente de integrare
% m= nr. variabile independente (x)
% r= nr. observatii (y)
% p= nr. constante cinetice (k)
% model = index model (1=RM1; 2=RM2; ... ; 9=RM9)
% k = [p,1] vector constante cinetice
% x = [n,m] matrice variabile independente (x)
% (timp de reactie, temperatura, etc.)
% y = [n,r] matrice observatii (y)
% (concentratii specii)
disp(' ')
disp('constante cinetice k1=k21 si apartenenta lor la modelul selectat (0=NU, 1=DA)')
for i=1:p
fprintf('k(%2.0f)= %11.4e ; aparteneta= %2.0f',i,k(i),ky(i))
fprintf('\n');
end
disp(' ')
figure(1)
o=200; % increment maxim de timp in reprezentari grafice
if model==1 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-'); end;
if model==2 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-'); end;
if model==3 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-',...
tm(1:o),ym(1:o,4),'g--'); end;
if model==4 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-'); end;
if model==5 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,4),'g--',...
tm(1:o),ym(1:o,8),'r:'); end;
if model==6 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,4),'g--',...
tm(1:o),ym(1:o,5),'g-.',tm(1:o),ym(1:o,8),'r:'); end;
if model==7 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-',...
tm(1:o),ym(1:o,6),'c-'); end;
if model==8 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-',...
tm(1:o),ym(1:o,6),'c-',tm(1:o),ym(1:o,7),'c:'); end;
if model==9 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-'); end;
title(['Model RM',num2str(model),';P(r-);G(b-);GP1(g-);GP2(g--)(nM)'])
ylabel('GP4(g-.);M(c-);MP1(c:);P2(r:)(nM)')
xlabel('time (min)')
figure(2)
if model~=7 & model~=8
plot(ym(:,1),ym(:,2),'b-')
title(['Model RM',num2str(model)])
ylabel('G (nM)'); xlabel('P (nM)')
hold on
end
if model==7 | model==8
subplot(2,1,1), plot(ym(:,1),ym(:,2),'b-')
title(['Model RM',num2str(model)])
ylabel('G (nM)'); xlabel('P (nM)')
hold on
subplot(2,1,2), plot(ym(:,1),ym(:,6),'b-')
ylabel('M (nM)'); xlabel('P (nM)')
hold on
end
end; % for norun
return
-----------------------------------------------------------------------------
function dy=rm19mf(t,C)
if model==4
Psp=k(1)/2/k(2);
if P<Psp G=1; end;
if P==Psp G=0.5; end;
if P<Psp G=0; end;
end