Slope2
Computes the slope of a measured signal at a point of interest x*.
A finite differencing scheme is used to compute the slope. Two values of the signal, one on either side of the point of interest are used as shown in the figure below.
Example

Figure 1. Finite differencing to evaluate the slope of a curve
Example
You want to compute the stiffness of a translational nonlinear spring at time T=5 seconds. The spring has an I MARKER=66, a J MARKER=55 and a free length, L0=100 mm.
>>> # Force at T=5.1
>>> y2 = ValueAtTime (
label = "Force @ T=5.1",
measuredValue = "FM(66,55,55)",
atTime = 5.1,
delta = 1e-1,
)
>>> # Displacement at T=5.1
>>> x2 = ValueAtTime (
label = "Displacement @ T=5.1",
measuredValue = "DM(66,55,55)",
atTime = 5.1,
delta = 1e-1,
)
>>> # Force at T=4.9
>>> y1 = ValueAtTime (
label = "Force @ T=4.9",
measuredValue = "FM(66,55,55)",
atTime = 4.9,
delta = 1e-1,
)
>>> # Displacement at T=4.9
>>> x1 = ValueAtTime (
label = "Displacement @ T=4.9",
measuredValue = "DM(66,55,55)",
atTime = 4.9,
delta = 1e-1,
)
>>> # The Slope at T=5.0
>>> k5 = Slope2 (
label = "Slope@5",
points = (y2,x2,y1,x1),
)