<tt> d = c2d(s, 1); </tt> 
      
         <tt> lti = LTISystem(d); </tt> 
       Define the MPC controller <pre class="programlisting"> horizon = 5; </pre>
<pre class="programlisting"></pre>
<pre class="programlisting"> ctrl = MPCController(lti, horizon); </pre>
<pre class="programlisting"></pre> Add state constraints <pre class="programlisting"> ctrl.model.x.min = [-5; -5]; </pre>
<pre class="programlisting"></pre>
<pre class="programlisting"> ctrl.model.x.max = [5; 5]; </pre>
<pre class="programlisting">