XWidthAtYVal
X-axis width spanned by points where Y reaches a target.
Syntax
Section titled “Syntax”M = XWidthAtYVal(X, Y, v)Description
Section titled “Description”Given paired samples X and Y, returns the X-axis distance between the first and last points where Y equals the target value v. Common for measuring pulse width, full-width-half-maximum (FWHM) of a peak, etc.
MathJet-specific (not in MATLAB).
Examples
Section titled “Examples”x = linspace(-5, 5, 100);y = exp(-x.^2); % Gaussian centered at 0XWidthAtYVal(x, y, 0.5) % ≈ 1.665 (FWHM = 2*sqrt(ln 2))See also
Section titled “See also”XAtYVal— X value where Y equals a target (interpolated).YAtXVal— Y value where X equals a target (interpolated).
Also categorized under: Range Functions / Math.