| 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 an object of the kWaveGrid class containing the grid coordinates and wavenumber matrices used in k-Wave simulations. The grid structures are indexed as: (x) in 1D; (z, x) in 2D; (z, x, y) in 3D.
Note For older versions of MATLAB in which custom class definitions are not supported, |
|
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 |
|
maximum spatial frequency supported by the grid |
|
evenly spaced array of time values [s] (set to 'auto' by |
|
number of spatial dimensions |
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] |
|
1D vector of the x coordinate [m] |
|
length of grid dimension [m] |
|
plaid ND grid of the wavenumber components centered about 0 |
|
maximum spatial frequency supported by the grid in the x direction |
For example, running kgrid = makeGrid(128, 0.1, 128, 0.1) at the command line will return:
kgrid =
kWaveGrid
Properties:
Nx: 128
Ny: 0
Nz: 128
dx: 0.1000
dy: 0
dz: 0.1000
kx: [128x128 double]
ky: 0
kz: [128x128 double]
k: [128x128 double]
kx_max: 31.4159
ky_max: 0
kz_max: 31.4159
k_max: 31.4159
t_array: 'auto'
dim: 2
x: [128x128 double]
y: 0
z: [128x128 double]
x_vec: [1x128 double]
y_vec: 0
z_vec: [1x128 double]
x_size: 12.8000
z_size: 12.8000
y_size: 0
cart2grid, interpCartData, kspaceFirstOrder1D, kspaceFirstOrder2D, kspaceFirstOrder3D, ndgrid, makeTime, smooth
|
makeDisc | makeSphere | ![]() |
© 2009, 2010, 2011 Bradley Treeby and Ben Cox.