Nw(n)-1)/2 &lt; Lp
0135                 pt=p(k-(Nw(n)-1)/2:k+(Nw(n)-1)/2);
0136                 P(n)=sum(pt.*win);
0137             <span class="keyword">end</span>
0138         <span class="keyword">end</span>
0139         <span class="comment">% Check if there are values at higher freqs that did not get filled in</span>
0140         <span class="comment">% due to the width of the smoothing window being too high</span>
0141         idx=min(find(f(2:end) == 0));
0142         <span class="keyword">if</span> 