%
% File: invpendc.m
% Controller for inverted pendulum simulation
% Created by Marc Bodson. Last revised: 05/23/25
%
% Control computations
%
% TO BE FILLED
%
% Store the results
%
if ip<=npoints
   ts(ip)=t;xcoms(ip)=xcom;xrefs(ip)=xref;
   ths(ip)=theta;xcarts(ip)=xcart;
   ip=ip+1;
end
if ip>npoints;done=1;end   % Stop the simulation when done