Hi Brad,
in release 1.3 the time gain compensation in examples _us_bode_phased_array.m and _us_bmode_linear_transducer.m was corrected.
But if one now needs a structured medium that has spatially varying alpha_coefficient then
(close to lines 250 in *_phased_array.m) the command:
tgc = exp(tgc_alpha_np_m * 2 * r);
will not execute, since variable tgc_alpha_np_m is now an (Nx,Ny,Nz)-array and no longer a scalar.
To circumvent this error one could choose (like is done in medical equipment anyway)
a constant tgc_alpha_np_m value averaged over the grid.
Best wishes, Bernie