function dydt = ode5(t,y) dydt = zeros(3,1); % a column vector dydt(1) = y(2); dydt(2) = y(3); dydt(3) = (-3.06091)*((y(2)^2)+(y(1)*y(3)))*(y(3)^0.67); end
options = odeset('RelTol',1e-6,'AbsTol',[1e-6 2e-6 3e-6]); [t,y] = ode45(@ode5,[0 10],[0 1 0],options); plot(t,y(:,1),'-',t,y(:,2),'-.',t,y(:,3),'.')
Best Answer