pan class="comment">% 50 % overlap</span>
0106         P=zeros(N,1);
0107         f=zeros(N,1);
0108         <span class="keyword">for</span> n =1:N
0109             P(n)=sum(p((n-1)*Nstep+2:(n+1)*Nstep+2).*win);
0110             f(n)=(n*(Nw-1)/2+2)*df;
0111         <span class="keyword">end</span>
0112     <span class="keyword">elseif</span> strcmp(res,<span class="string">'LOG'</span>)
0113         <span class="comment">% Calculate step parameter s</span>
0114         s=log(fmax/fmin)/(Nfreqs-1);
0115    