.php xmlns="http://www.w3.org/1999/.php"> - k-Wave MATLAB Toolbox
k-Wave Toolbox


Create vector of log or linear spaced points.


points = getSpacedPoints(X1, X2)
points = getSpacedPoints(X1, X2, N)
points = getSpacedPoints(X1, X2, N, spacing)


getSpacedPoints generates a row vector of either logarithmically or linearly spaced points between X1 and X2. When spacing is set to 'linear', the function is identical to the inbuilt logspace function, except that X1 and X2 define the start and end numbers, not decades. For logarithmically spaced points, X1 must be > 0. If N < 2, X2 is returned.


X1 starting points value
X2 ending points value (where X2 > X1)

Optional Inputs

N number of points in the vector (default = 100)
spacing 'log' or 'linear' spaced values (default = 'linear')


points row vector of equally spaced points

See Also