Problems with Function handle

조회 수: 1 (최근 30일)
Dionisio Mendoza
Dionisio Mendoza 2019년 5월 14일
I'm trying to imitate a mathematical model with differential equations, but I can not make it work. I need to obtain the graph that I show in the image and the model that I try to make is example 3.2 of the PDF.
Moments ago he showed me an unidentical but similar graphic, now he does not give me anything.Captura.PNG
The function:
function dydx = fff (x,y)
Kga=1*10^-5;
global Kh0;
global Kh1;
Ksr=1;
Vga=Kga*Ra*Gaby;
Vhi=Khi*Gagtp;
Vsr=Ksr*Gby*Gagdp;
dGabydx = -Vga-Vsr;
dGagtpdx = Vga-Vh0-Vhi;
dydx = [dGabydx dGagtpdx]';
The scrypt:
global Kh0;
global Kh1;
Kh0=0;
Kh1=0;
[x,y]= ode45(dydx,[0,2],[.1 .1]);
plot(x,y);
xlabel('tiempo (h)')
ylabel('biomasa')

답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by