    threshold = interp1(autodet.snr_vec, autodet.thr_vec, pow2db(snr_avg),<span class="string">'previous'</span>,<span class="string">'extrap'</span>);
0100     ngv_detected = (sig_cor_hd &gt; threshold);
0101     
0102     <span class="comment">% Continue processing depending on whether packet is legacy or NGV</span>
0103     <span class="keyword">if</span> (ngv_detected)
0104         <span class="keyword">if</span> (TX.ppdu_fmt ~= 2)
0105             err = 7;
0106             <span class="keyword">return<