• esProc
Tutorial
Function Reference
User Reference
External Library Guide
Data File Tool Manual
DQL Tutorial
Cluster Server Manager Manual
SPL WIN Manual
• YModel
User Reference
JSON-style Parameter Guide
• ReportLite
User Reference
• Official Website

# sg()

Read（1798） Label: vector, matrix, sg smoothing,

Description:

Perform SG smoothing on each row of a vector or a matrix.

Syntax:

sg(A,n,m,d)

Note:

The external library function (See External Library Guide) performs SG smoothing on each row of vector A or matrix A. The computation gets a number of (m) data points and handles SG smoothing using the nth order curve, during which the number of differentiations is d; will not calculating derivatives when parameter d is absent.

The function returns smoothing result when parameter A has parameters and the smoothing coefficient if A is null.

Parameter:

 A A vector or a matrix n Degree of a polynomial that satisfies n

Return value:

A sequence

Example:

 A 1 [1,4,9,26,30,64,80,99] 2 =sg(,2,5) Return a matrix whose smoothing coefficient is calculated based on 5 points and 2rd order curve. 3 =sg(A1,2,5) Perform SG smoothing on A1 based on 5 points and 2rd order curve and return smoothing result. 4 =sg(A1,2,5,1) Perform SG smoothing on A1 based on 5 points and 2rd order curve with one differentiation.