Hello! This release is very well timed as I was about to write to you with a bug report but you've fixed it. Here's the info anyway for the benefit of anyone else experiencing the same issue:
I’d been comparing the code to Tabei et al’s 2002 JASA paper and realised there was a mismatch, specifically that the following lines of code don’t match their equation 26:
kspaceFirstOrder3D.m version B.0.4 lines 1032 – 1035:
rhox = bsxfun(@times, pml_x, rhox - dt.*rho0 .* duxdx);
rhoy = bsxfun(@times, pml_y, rhoy - dt.*rho0 .* duydy);
rhoz = bsxfun(@times, pml_z, rhoz - dt.*rho0 .* duzdz);
I wasn’t getting the PML attenuation they reported so I suspected there may be a problem. And low and behold in the new version you've fixed it! :-)
kspaceFirstOrder3D.m version B.0.5 lines 812 – 814:
rhox = bsxfun(@times, pml_x, bsxfun(@times, pml_x, rhox) - dt.*rho0 .* duxdx);
rhoy = bsxfun(@times, pml_y, bsxfun(@times, pml_y, rhoy) - dt.*rho0 .* duydy);
rhoz = bsxfun(@times, pml_z, bsxfun(@times, pml_z, rhoz) - dt.*rho0 .* duzdz);
Many thanks for your hard work in creating this excellent resource and your generosity in sharing and disseminating it.
Jon