%
% File: bbeamcinit.m
% Controller initialization for ball and beam simulation
% Created by Marc Bodson. Last revised: 05/25/25
%
% Controller design
%
% TO BE FILLED
%
% Set-up of the simulation and storage variables
%
tmax=18;                      % Simulation time
npoints=round(tmax/dt);       % Number of simulation points
ts=zeros(npoints,1);          % Time variable
xrefs=zeros(npoints,1);       % Reference position
xs=zeros(npoints,1);          % Ball position
vs=zeros(npoints,1);          % Ball velocity
ths=zeros(npoints,1);         % Beam angle
ip=1;                         % Initial index for storage