 is plotted by a function f(x) with a uniform step size h, then you can use the nabla = gradient(f)/h to compute the slope of f(x).
 is plotted by a function f(x) with a uniform step size h, then you can use the nabla = gradient(f)/h to compute the slope of f(x).  , and then find the index idx that is nearest to, or exactly at this point.
, and then find the index idx that is nearest to, or exactly at this point.

 is plotted by a function f(x) with a uniform step size h, then you can use the nabla = gradient(f)/h to compute the slope of f(x).
 is plotted by a function f(x) with a uniform step size h, then you can use the nabla = gradient(f)/h to compute the slope of f(x).  , and then find the index idx that is nearest to, or exactly at this point.
, and then find the index idx that is nearest to, or exactly at this point.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!