Matlab help please

Hi, I am trying to run an mfile, I have derived an equationa n conditions which must be met....the m file is below.

function dc=dcdt(t,c)
K=0.125;
c0=0.125;
vmax=5;
if t<30;
f0=10; % the volumetric flow rate of rice mixture and amylase in mL
fhcl=3.5; % units mL
f1=0; % in the first half hour no chyme is pumped out
V = 17.5+f0*t+fhcl*t; % food in mouth initiates cephalic phase hence the 17.5 in mL
R=vmax*c/(K*c);
z=f0/(f0+fhcl);
tau=V/(f0+fhcl);
elseif t>30;
f0=0;
fhcl=3.5;
f1=5;
tex=t-30;
V=387.5+fhcl*tex-f1*tex;
R=vmax*c/(K*c);
z=f0/(f0+fhcl);
tau=V/(f0+fhcl);
end
dc=((z*c)+((R)*V)-c0)/tau;

I have defined random c0, vmax and k values because i am get to determine thier true value. The file when invoked does give me a graph, however the graph isnt right. I am meant to be getting a rapid increase with a peak then slow decrase. But all i get is a linear curve. Would someone be able help me with this? Btw the file is along run using the rk4.

Comments

  • Hi....could someone help me. It would be much appreciated. Thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion