# SHF

The SHF function evaluates a simple harmonic function at a specific value $x$ .

## Format

$\text{SHF}\left(x,{x}_{0},A,\omega ,\varphi ,\overline{y}\right)$

## Example

<Motion_Joint
id              = "301001"
type            = "EXPRESSION"
val_type        = "D"
expr            = "SHF(TIME,0,2,2,0,0)"
joint_id        = "10003"
joint_type      = "R"/>

## Arguments

$x$
Any valid expression used as an independent variable for the Simple Harmonic Function (SHF). For example, to use the z-displacement of I marker with respect to the J marker as resolved in the reference frame of the RM marker as the independent variable, specify $x$ as DZ({marker_i.idstring}, {marker_j.idstring}, {marker_rm.idstring}).
${x}_{0}$
The independent variable offset.
$A$
The amplitude of the simple harmonic function.
$\omega$
The frequency of the simple harmonic function. It is assumed to be specified in radians per unit of the independent variable unless a D is used after the value.
$\varphi$
A phase shift in the simple harmonic function. It is assumed to be in radians unless a D is used after the value.
$\overline{y}$
The average value of the simple harmonic function.

## Definition

(1)
$\text{SHF}=A\mathrm{sin}\left(w\left(x-{x}_{0}\right)-\varphi \right)+\overline{y}$