k-Wave User Forum » Topic: wave vector
http://www.k-wave.org/forum/topic/wave-vector
Support for the k-Wave MATLAB toolboxen-USSun, 08 Sep 2024 00:01:16 +0000http://bbpress.org/?v=1.0.2<![CDATA[Search]]>q
http://www.k-wave.org/forum/search.php
bencox on "wave vector"
http://www.k-wave.org/forum/topic/wave-vector#post-111
Mon, 14 Mar 2011 11:11:33 +0000bencox111@http://www.k-wave.org/forum/<p>Hi Jeremy,</p>
<p>Please can you be a bit more specific about what it is you don't understand. Is it that there are two slightly different uses of the word 'vector' here?</p>
<p>kx and ky are vectors in the Matlab sense of 'vector' meaning a list of numbers. They contain a discretised version of the wavenumber components in the x and y directions of the wavevector (kx,ky), where wavevector here means 'vector' in the mathematical sense meaning a quantity with direction and magnitude. k is the magnitude of the wavevector (kx,ky).</p>
<p>The relationship between the discretised spatial coordinates (x,y) and the discretised wavenumber components (the coordinates in wavenumber space) (kx,ky) is fixed by the requirements of the Fast Fourier Transform.</p>
<p>Hope that helps,</p>
<p>Ben
</p>jeremyk on "wave vector"
http://www.k-wave.org/forum/topic/wave-vector#post-110
Sat, 12 Mar 2011 19:17:57 +0000jeremyk110@http://www.k-wave.org/forum/<p>Hi Ben,</p>
<p>This may be a stupid question, but in one over your papers you define the wave vector<br />
as </p>
<p>nx=(-Nx/2:Nx/2-1)';<br />
ny=(-Ny/2:Ny/2-1)';</p>
<p>[x,y]=meshgrid(nx*dx,ny*dy);<br />
[kx,ky]=meshgrid(nx*2*pi/(Nx*dx),ny*2*pi/(Ny*dy));</p>
<p>k=sqrt(kx.^2+ky.^2); </p>
<p>can you explain why you did this? i don't quite understand how it works.</p>
<p>thank you, jeremy
</p>