on, 'Tenenbaum');
    focus_func(3, index) = sharpness(p0_recon, 'NormVariance');
    
end
</pre>

<p>The variation in the focus functions with sound speed is shown below. Each of the three metrics give the same maximum value at 1500 m/s, which corresponds to the actual sound speed in this example.</p> 

<img vspace="5" hspace="5" src="images/example_pr_2D_tr_autofocus_01.png" style="width:560px;height:420px;" alt="">

<p>In general, the efficacy of this approach will depend on both the intrinsic content of