Skip to content

XAtYVal

X value where Y equals a target (interpolated).

M = XAtYVal(X, Y, v)
M = XAtYVal(X, Y, v, flag)

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).

x = linspace(0, 10, 100);
XAtYVal(x, sin(x), 0.5) % ≈ 0.5236 (first x where sin(x) = 0.5)
  • 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.