from Full State Feedback of Furuta Pendulum by Vikash Gupta
The .m file contains the pendulum parameters and .mdl is the simulink model for the pendulum.

Furuta_Pendulum.m
%% List of parameters

m_p= 0.31; % mass of pendulum (kg)
l_p=0.58; % pendulum length (m)
m_c=0.53; % cart mass (kg)
l_c=0.36; % base link length (m)
l_cw=0.075; % counter weight link length
m_cw= 0.31; % counter weight mass
b_c=0.025; % rotation damping associated with base link (N.m.sec)

J=m_c*l_c^2 + m_cw*l_cw^2;
g=9.81; % gravity

%% Matrices

A=[0 1 0 0;
   0 -b_c/J -(m_p*g*l_c/J) 0;
   0 0 0 1;
   0 (l_c*b_c)/(l_p*J) (g/l_p)+(m_p*g*l_c^2)/(J*l_p) 0];

B=[0;1/J;0;-l_c/(l_p*J)];

C=[1;0;0;0];
D=[0;0;0;0];

P=[-1.7+7.5i;-1.7-7.5i;-4.8;-3];

K=acker(A,B,P);

subplot(4,1,1)

plot(tout,yout(:,1)*180/pi);grid on;
xlabel('Time');ylabel('\alpha');

subplot(4,1,2)

plot(tout,yout(:,2)*180/pi);grid on;
xlabel('Time');ylabel('\dot{\alpha}');

subplot(4,1,3)

plot(tout,yout(:,3)*180/pi);grid on;
xlabel('Time');ylabel('\theta');

subplot(4,1,4)

plot(tout,yout(:,4)*180/pi);grid on;
xlabel('Time');ylabel('\dot{\theta}');

Contact us at files@mathworks.com