system_data.W(:,end+1) = w_new;
0172         
0173         Sys.model_data.time = time_d;
0174         Sys.model_data.X = double(Xpred);
0175         Sys.model_data.Y = [Sys.sysd.C*double(Xpred(:,1:end-1)) + Sys.sysd.D*[double(Upred); double(Wn(:,1:end-1))]];
0176         Sys.model_data.U = double(Upred);
0177         Sys.model_data.W = Wn;
0178         
0179     <span class="keyword">end</span>
0180 
0181     <a name="_sub3" href="#_subfunctions" class="code">function update_controller_data()</a>
0182      