print

Function: hat

Reference

Home

List of PyCrysFML08 Dictionaries

List of PyCrysFML08 Functions

USE

hat returns the value of the hat function:

if x <= -w/2 or x >= w/2:

f = 0

If x >-w/2 and x < w/2:

f = 1 / w

function call

r = hat(x : float,w : float)

VariableTypeDescription
xfloatValue at which the function is evaluated.
wfloatFunction parameter
rtuple

The tuple returned by the function.

r[0] : int, error code. If non-zero, an error has occurred.

r[1] : str, error message.

r[2]: float, value of the function at x.

examples