m.psm.pATM(1,:,p)=mean(ATM,1);  <span class="comment">%average ATM by quarter</span>
m.psm.pDuration(1,:,p)=mean(mDuration,1);   <span class="comment">%average duration by quarter</span>
<span class="keyword">if</span> p==s.npoids &amp;&amp; k==s.nscenario
    m.CPI = CPI_k(:,1:s.nperiod);   <span class="comment">%CPI for each simulation by quarter</span>
    m.GDP = GDP_k(:,1:s.nperiod);   <span class="comment">%GDP for each simulation by quarter</span>
<span class="keyword">end</span>
clear <span class="s