I am solving a system of differential equations defined in the following function 'rigid':
function dy = rigid(t,y)dy = zeros(3,1); % a column vector
dy(1) = y(2) * y(3);dy(2) = -y(1) * y(3);dy(3) = -0.51 * y(1) * y(2);
I am using ODE45 function with the following syntax to solve the differential equations:
options = odeset('RelTol',1e-4,'AbsTol',[1e-4 1e-4 1e-5]);sol = ode45('rigid',[0 12],[0 1 1],options);
I expect the result to be a structure, however, the result is a 1-D array:
>> whos sol Name Size Bytes Class Attributes sol 85x1 680 double
Best Answer