XAtYVal
X value where Y equals a target (interpolated).
Syntax
Section titled “Syntax”M = XAtYVal(X, Y, v)M = XAtYVal(X, Y, v, flag)Description
Section titled “Description”Given paired samples X and Y, returns the X coordinate where Y equals the target value v, interpolating linearly between adjacent samples when needed. If multiple crossings exist, returns the first one. Common signal-processing query for finding rise/fall times.
MathJet-specific (not in MATLAB).
Examples
Section titled “Examples”x = linspace(0, 10, 100);XAtYVal(x, sin(x), 0.5) % ≈ 0.5236 (first x where sin(x) = 0.5)See also
Section titled “See also”YAtXVal— Y value where X equals a target (interpolated).XWidthAtYVal— X-axis width spanned by points where Y reaches a target.
Also categorized under: Range Functions / Math.