Function File: f = fwhm (y)
Function File: f = fwhm (x, y)
Function File: f = fwhm (…, "zero")
Function File: f = fwhm (…, "min")
Function File: f = fwhm (…, "alevel", level)
Function File: f = fwhm (…, "rlevel", level)

Compute peak full-width at half maximum (FWHM) or at another level of peak maximum for vector or matrix data y, optionally sampled as y(x). If y is a matrix, return FWHM for each column as a row vector.

The default option "zero" computes fwhm at half maximum, i.e. 0.5*max(y). The option "min" computes fwhm at the middle curve, i.e. 0.5*(min(y)+max(y)).

The option "rlevel" computes full-width at the given relative level of peak profile, i.e. at rlevel*max(y) or rlevel*(min(y)+max(y)), respectively. For example, fwhm (…, "rlevel", 0.1) computes full width at 10 % of peak maximum with respect to zero or minimum; FWHM is equivalent to fwhm(…, "rlevel", 0.5).

The option "alevel" computes full-width at the given absolute level of y.

Return 0 if FWHM does not exist (e.g. monotonous function or the function does not cut horizontal line at rlevel*max(y) or rlevel*(max(y)+min(y)) or alevel, respectively).

Package: signal