ass="keyword">...</span>
               halfbeam_cur);
    halfbeam_top = halfbeam_cur;
  <span class="keyword">else</span> <span class="comment">% not feasible</span>
    fprintf(1,<span class="string">'Problem is not feasible for half beam-width = %d degress\n'</span>,<span class="keyword">...</span>
               halfbeam_cur);
    halfbeam_bot = halfbeam_cur;
  <span class="keyword">end</span>
<span class="keyword">end</span>

<span class="comment">% optimal beamwidth</span>
halfbeam = halfbeam_top;
fp