k-Wave Toolbox |
![]() ![]() |
Create k-space grid structure
kgrid = makeGrid(Nx, dx) kgrid = makeGrid(Nx, dx, Nz, dz) kgrid = makeGrid(Nx, dx, Ny, dy, Nz, dz)
makeGrid
creates a MATLAB structure containing the grid coordinates and wavenumber matrices for use in k-space simulations and reconstructions. Note, the grid structures are indexed as: (x) in 1D; (z, x) in 2D; (z, x, y) in 3D.
|
number of pixels in each Cartesian direction |
|
pixel size in each Cartesian direction [m] |
|
k-space grid structure used by the simulation and reconstructions functions within k-Wave |
The structure kgrid
has the following fields:
Fieldname | Description |
---|---|
|
ND grid of the scalar wavenumber |
And for each spatial dimension x, y, z:
Fieldname | Description |
---|---|
|
number of pixels |
|
size of an individual pixel [m] |
|
plaid ND grid of the x coordinate centered about 0 [m] |
|
plaid ND grid of the x coordinate beginning at 0 [m] |
|
length of grid dimension [m] |
|
plaid ND grid of the wavenumber components centered about 0 |
For example, running kgrid = makeGrid(128, 0.1, 128, 0.1)
at the command line will return:
kgrid = Nz: 128 dz: 0.1000 Nx: 128 dx: 0.1000 x_size: 12.8000 z_size: 12.8000 z: [128x128 double] x: [128x128 double] z_off: [128x128 double] x_off: [128x128 double] kz: [128x128 double] kx: [128x128 double] k: [128x128 double]
cart2grid
, interpCartData
, kspaceFirstOrder1D
, kspaceFirstOrder2D
, kspaceFirstOrder3D
, ndgrid
, makeTime
, smooth
![]() |
makeDisc | makeSphere | ![]() |
© 2009 Bradley Treeby and Ben Cox.