*BeginStatsTemplates()
Indicates the beginning of a statistics template block.
Syntax
*BeginStatsTemplates()
Application
MotionView, HyperView, HyperGraph, TextView, and MediaView.
Context
Preference Files
Example
*Id("MotionView4.0")
*BeginPage()
*IsActive()
*Title("Untitled", Off)
*Layout(1)
*CurrentTimeStep(0)
*StartTime(0)
*EndTime(0)
*BeginWindow(Plot)
*IsActive()
*TimeScale(1)
*TimeDelay(0)
*BeginPlot()
*EndPlot()
*EndWindow()
• • •
*EndPage()
{templex_off}
*BeginStatsTemplates()
*BeginTemplate("Linear Regression")
*BeginText()
{N = min({numpts(x), numpts(y)}) }
{q = sum(x)}
{K = {{N, q}, {q, sum(x^2)}}}
{L = {sum(y), sum(x*y)}'}
{A = inverse(K)*L}
Linear Least Squares Regression over
the chosen range index {from} -> {to}
y = A * x + B where A = {A[1]}
B = {A[0]}
*EndText()
*EndTemplate()
*EndStatsTemplates()
{templex_on}
Comments
The *BeginStatsTemplates() block contains user-defined statistics templates.
Every *BeginStatsTemplates() statement requires an ending *EndStatsTemplates() statement.