Hi,
Anonymous functions are not supported for code generation. Create another function that defines the differential equation and call it using the function handle in the ode45 function. For example, lets say that I have defined my differential equation like this:
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);
end
Then use the ode45 solver function to call this function:
ode45(@rigid,timspan,initial conditions)
HTH, Navaneeth