e</span>
0017 ts=Sys.ts; <span class="comment">% sampling time</span>
0018 L=Sys.L;  <span class="comment">% horizon (# of steps)</span>
0019 
0020 <span class="comment">%% System dimensions and variables</span>
0021 nu=Sys.nu;
0022 nx=Sys.nx;
0023 nw=Sys.nw;
0024 ny=Sys.ny;
0025 
0026 <span class="comment">% variables</span>
0027 X = sdpvar(nx, 2*L);
0028 Y = sdpvar(ny, 2*L-1);
0029 W = sdpvar(nw, 2*L);
0030 
0031 <span class="comment">% given as parameters to the optimizer</span>
0032 done = binvar(1,2*L-