wsum

From STX Wiki
< Programmer Guide‎ | Command Reference‎ | EVAL
Revision as of 15:05, 17 May 2010 by 193.171.195.8 (talk) (initial import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
wsum

A weighted summation.

Usage:

wsum(xv,yv,w,s,r)

Parameters:
xv
A scalar vector.
yv
A function vector (yi=f(xi)) with the same length as x.
w
The weighting function: a rectangle (0), a triangle (1), a Hanning window (2) or a Hamming window (3).
s
Normalize the results (0|1). If 1 -> scale with "1 / sum-of-weights".
r
The summation extent. r can be one, two or three arguments (see sum for details). Note, however, that the extent is given in values on the x-scale, not in indices.
Result:

A scalar or vector depending on the parameters.

Navigation menu

Personal tools