
rf =  0.54;  <span class="comment">% frame center of mass to wheel</span>
rt =  0.27;  <span class="comment">% frame centre of mass to turntable</span>
rr =  rf+rt;  <span class="comment">% distance wheel to turntable</span>

M = 24; MM = 2*pi*(0:M)/M;
RR = [<span class="string">'r-'</span>;<span class="string">'r-'</span>;<span class="string">'r-'</span>;<span class="string">'k-'</span>;<span class="string">'b-'</span>;<span class="string">'b-'</span>;<span class="string">'b-'</span>];
ii = 10000;


qq = 