k-Wave Toolbox |
Create k-Wave grid structure
kgrid = makeGrid(Nx, dx) kgrid = makeGrid(Nx, dx, Ny, dy) 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, 1) in 1D; (x, y) in 2D; (x, y, z) in 3D.
Note For older versions of MATLAB in which custom class definitions are not supported, |
|
number of grid points in each Cartesian direction |
|
grid point spacing in each Cartesian direction [m] |
|
k-Wave 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 time steps (set to 'auto' by |
|
time step [s] (set to 'auto' by |
|
number of spatial dimensions |
|
total number of grid points |
And for each spatial dimension x, y, z:
Fieldname | Description |
---|---|
|
number of grid points |
|
grid point spacing [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 |
|
1D vector of the wavenumber components |
|
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 = makeGrid(128, 0.1, 128, 0.1) kgrid = kWaveGrid Properties: Nx: 128 Ny: 128 Nz: 0 dx: 0.1000 dy: 0.1000 dz: 0 kx_vec: [128x1 double] ky_vec: [128x1 double] kz_vec: 0 k: [128x128 double] kx_max: 31.4159 ky_max: 31.4159 kz_max: 0 k_max: 31.4159 t_array: 'auto' dim: 2 x: [128x128 double] y: [128x128 double] z: 0 kx: [128x128 double] ky: [128x128 double] kz: 0 x_vec: [128x1 double] y_vec: [128x1 double] z_vec: 0 x_size: 12.8000 z_size: 0 y_size: 12.8000 dt: 'auto' Nt: 'auto' total_grid_points: 16384
cart2grid
, interpCartData
, kspaceFirstOrder1D
, kspaceFirstOrder2D
, kspaceFirstOrder3D
, ndgrid
, makeTime
, smooth
makeDisc | makeLine |
© 2009-2014 Bradley Treeby and Ben Cox.