Problems with Function handle
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/219574/Captura.png)
![Captura.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/219574/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 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!