Mout = sw_resconv(M,x,dx,func)
Mout = sw_resconv(M,x,dx,func) convolutes a 2D matrix with a Gaussian
along the first dimension of the matrix. The convolution keeps the
integrated intensity constant. It assumes the
contains the center points of the bins and the distances between the
generated bin edges is calculated by interpolating from the distances
between the given
x bin center positions.
- Arbitrary matrix with dimensions of .
- Column vector of coordinates along the first dimension of the matrix.
- FWHM value of the Gaussian as a
function of . Either a function handle with a header
fwhm = dx(xVal)or a vector of polynomial coefficients that produces the right standard deviation. In this case in the function the following line will be executed
fwhm = polyval(dx,xVal)or a constant FWHM value.
The standard deviation of the Gaussian is calculated from the given value using the formula If a general resolution function is provided in the
funcargument, it will be called as
y = func(x,[1 x0 fwhm]). In this case the
fwhmcan be a row vector and the meaning of the different parameters will depend on
- Resolution function shape with header
y = func(x,p), where
xis a column vector,
pis a row vector of parameters. The meaning of the first 2 elements of the parameter vector are fixed.
p(1)integral of the function.
p(2)center of mass position of the function.
Optional, default value is
- Matrix with same dimensions as the input