matlab - Solving ode45 with a time dependent parameter in one differential equation -


i modeling ecosystem in isle royale, , have differentia equation looks this:

function dydx = project1(t, y)  w = y(1); m = y(2); t = y(3); f = y(4); r = y(5);  gw = 2; gm = 10; gt = 0.7*10; gf = 0.6*10; pr = 1000; dw = 5; dm = 1; dt = 0.7; df = 10; km = 1; kf = 50; kr = 10; kt = 0.2; dydx = zeros(5, 1); dydx(1) = gw*km*w*m-dw*w; dydx(2) = gm*kf*m*f-dm*m-km*m*w-kt*m*t; dydx(3) = gt*t*m-dt*t; dydx(4) = gf*kr*f*r-df*f-kf*f*m; dydx(5) = pr-kr*r*f-kr*r; 

i want last dif equation, dydx(5), dr/dt = pr*t-(other stuff). i've tried t defined above, , y, none seems work. pr production rate of resources, , depends on time. how can incorporate time dependency?


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -