k-Wave Toolbox |
Create a binary map of a line within a 2D grid
line = makeLine(Nx, Ny, startpoint, endpoint) line = makeLine(Nx, Ny, startpoint, angle, length)
makeLine
creates a binary map of a line within a two-dimensional grid (the line is denoted by 1's in the matrix with 0's elsewhere). The line can be defined either by its endpoints or by a starting point, an angle (direction), and a length.
|
size of the 2D grid [grid points] |
|
two-element vector identifying the start point for the line [grid points] |
|
two-element vector identifying the end point for the line [grid points] |
|
the direction of the line [radians] |
|
the length of the line [grid points] |
|
2D binary map of a line |
makeCircle
, makeDisc
makeGrid | makeSphere |
© 2009-2014 Bradley Treeby and Ben Cox.