MATLAB: Trying to solve 1st Order differential equaiton simultaniously

1st order

Hi, I am trying solve 1st order ODE simultaneously, and i have been sitting on it for a while and its just say "busy" on the status bar. I am sure i am doing something wrong. The M file i created is Below: M-file: function dcdt= CELLULOSE(t,c) %c(1)=c(A), c(2)=c(B), c(3)=c(C), c(4)=c(D), c(5)=c(E), c(6)=c(F), c(7)=c(G), %c(8)=c(H), c(9)=c(I), c(10)=c(J), c(11)=c(K), c(12)=c(L), c(13)=c(M) global K1 K2 K3 K4 dcdt=[-c(1)*(K1+K4); K1*c(1)-c(2)*(K2+K3); 0.95*K2*c(2); 0.25*K2*c(2); 0.20*K2*c(2);0.20*K2*c(2);0.25*K2*c(2); 0.20*K2*c(2);0.15*K2*c(2);0.1*K2*c(2);0.9*K2*c(2);0.65*K2*c(2);K3*c(2)]; Call Function: >> global K1 K2 K3 K4 >> K1=3.14*10^16; >> K2=2.7097*10^7; >> K3=3.000*10^12; >> K4=1.7256*10^6; >> tspan =[0:400]; >> [t,c]=ode45(@CELL,tspan, c0); ??? Undefined function or variable 'c0'.
>> c0=[1 0 0 0 0 0 0 0 0 0 0 0 0]; >> [t,c]=ode45(@CELL,tspan, c0);
Help Help Help

Best Answer

The rest of the code you show turns out not to be relevant to this. The problem is entirely confined to the last two lines. You appear to show that you are initializing c0, but then in the very next command, it does not know of any c0.
Please check to be sure that in both places you are referencing c-zero, and that you have not accidentally used c-oh in one of them.