tfinal = 100;
t = linspace(0,tfinal,100);
winitial = [1 300];
[T, Ca] = ode45(@sub1,t,winitial)
plot(t,Ca)
function d_dt = sub1(Ca,T)
d_dt = zeros(2, 1);
d_dt(1,1) = -0.1*Ca*exp(-300/T);
d_dt(2,1) = 1*Ca*exp(-300/T);
end
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-2.
Error in explicit_Eu_hw>sub1 (line 28)
d_dt(1,1) = -0.1*Ca*exp(-300/T);
Error in odearguments (line 90)
f0 = feval(ode,t0,y0,args{:});
Error in ode45 (line 115)
odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
Error in explicit_Eu_hw (line 20)
[T, Ca] = ode45(@sub1,t,winitial)