Personal tools
You are here: Home Documentation Users Guide Appendix A: External Functions CONVOLVEI
Document Actions

CONVOLVEI

CONVOLVEI (VAR, WEIGHT), CONVOLVEJ (VAR, WEIGHT) , 
CONVOLVEK (VAR, WEIGHT), CONVOLVE L (VAR, WEIGHT)
Convolve I (J,K,or L)component of variable with weight function

Arguments:

VAR

COM: variable to convolve


WEIGHT

Weight function

Result Axes:

X

Inherited from VAR


Y

Inherited from VAR


Z

Inherited from VAR


T

Inherited from VAR

This function (and likewise CONVOLVEJ, CONVOLVEK, and CONVOLVEL) convolves the variable VAR, with the weight function, wt along the X axis. Note that the variable's context may not be of adequate size for the full calculation. Missing data flags will be inserted where computation is impossible.

When bad data points are encountered in the component data all result data depending on it are flagged as bad, too.

The weight function is applied at each point from i-hlen to i+hlen, where hlen is half the length of the weight function. If the function is of even length, a zero weight is used at the upper end. Thus if the weights were {0.1, 0.4, 0.4, 0.1} the result at point I would be computed as the sum 0.1* COM(i-2) + 0.4* com(i-1) + 0.4* COM(i) + 0.1* COM(i+1) + 0.* COM(i+2)

Example:

Use the function to smooth a variable.

yes? LET weight = {0.25, 0.5, 0.25}
yes? LET c = SIN(x[x=0:10:.1]) + RANDU(X[X=0:10:.1])/5
yes? PLOT c
yes? PLOT/OVER/TITLE="convolvei" CONVOLVEI(c,weight)



Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: