deg2rad=pi/180;
x0=[180 0]*deg2rad;
amp = 30;
bias = 0;
T = [0:0.05:10]';
n = size(T,1);
u = amp*prbs(n,1,3,0.8,1)+bias;

op=simset('solver','ode23s','InitialState',x0);

[t,x,y]=sim('pend_io', T, op, [T u]);

plot(t,y);
