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.

Here is a code fragment that would perform this calculation.
>>> # 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),
    )
The calculation in Slope2 for this example is implemented as:(1)
k =   y 2  -  y 1 x 2  -  x 1 MathType@MTEF@5@5@+= feaagKart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbdfwBIj xAHbstHrhAaerbuLwBLnhiov2DGi1BTfMBaeXafv3ySLgzGmvETj2B Sbqefm0B1jxALjhiov2Daebbfv3ySLgzGueE0jxyaibaieYdf9irVe eu0dXdh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqaq=JfrVk FHe9pgea0dXdar=Jb9hs0dXdbPYxe9vr0=vr0=vqpWqaaiaaciWadm aadaGaciaaeeGabuGaaOqaaabbaaaaaG+acXwDLbWdbiaadUgacaqG 1aGaaeiiaiabg2da9iaabccadaWcaaqaaiaadMhadaWgaaWcbaGaaG OmaaqabaGccaqGGaGaaeylaiaabccacaWG5bWaaSbaaSqaaiaaigda aeqaaaGcbaGaamiEamaaBaaaleaacaaIYaaabeaakiaabccacaqGTa GaaeiiaiaadIhadaWgaaWcbaGaaGymaaqabaaaaaaa@50BA@