I have a system that I coded in Matlab .m file. As I have to extend it further into a complex control loop, I wish to convert it into simulink model.
But the plot of simulink model is not coming out to be the same as the code plot. Kindly check what the problem might be.
Simulink file is attached.
[t,x] = ode45(@EOM,[0 10],[0;pi/2]);
function [dxdt] =EOM(t,x)
g=9.8 ; l=0.3 ; m1=4 ;
dxdt = [x(2); -(g/l)*cos(x(1))+u/(m1*l^2)];