</code>.</p>

<pre class="codeinput">
<span class="comment">% smooth the initial pressure distribution and restore the magnitude</span>
source.p0 = smooth(source.p0, true);
</pre>

<p>The default smoothing within <code><a href="kspaceFirstOrder2D.html">kspaceFirstOrder2D</a></code> can be modified via the optional input parameter <code>'Smooth'</code>. If given as a single Boolean value, this setting controls the smoothing of the initial pressure along with the sound speed and density distributions. To cont