light-matlab notranslate"><div class="highlight"><pre><span></span><span class="c">% Initialize residual generators</span>
<span class="k">for</span> <span class="nb">i</span><span class="p">=</span><span class="mi">1</span><span class="p">:</span><span class="nb">length</span><span class="p">(</span><span class="n">RG_results</span><span class="p">.</span><span class="n">res_gen_cell</span><span class="p">)</span>
    <span class="n">rg</span> <span class="p">=</span> <span class="n">RG_results</span><span