Defining function file of ODE function
2 views (last 30 days)
Show older comments
Carey n'eville
on 23 Nov 2020
Commented: Carey n'eville
on 23 Nov 2020
%We have initial concentration C(0)=5, but I didn't understand how I use this value and also my code does'nt work.
function dCdt=Conc(C,t)
global t;
global C;
k1=0.7;
t=0:1:6;
Vo=1;
Q=Vo;
Cin=200;
dCdt=-(k1+(t/(Vo+Q*t)))*C+((Q*Cin)/(Vo+Q*t));
end
%I get this error, Could you help to me, please:
%Error using /
%Matrix dimensions must agree.
%Error in Conc (line 10)
% dCdt=-(k1+(t/(Vo+Q*t)))*C+mrdivide((Q*Cin),(Vo+Q*t));
0 Comments
Accepted Answer
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!