HTML automatically generated with rman

## Name

tabtrend - difference rows from previous rows

## Synopsis

tabtrend [parameter=value]

## Description

tabtrend takes a single column from an ASCII table, and differences subsequent values, creating a new column that is thus one row shorter.

Note that for a gaussian signal, differencing subsequent elements will create a distribution with a noise sqrt(2) larger than the input signal.

## Parameters

The following parameters are recognized in any order if the keyword is also given:
in=
Input file name. No default.
xcol=
Column(s) to use 
nmax=
max size if a pipe 
cumul=t|f
Cumulative, instead of differences. Default: false
orig=t|f
Also show the original column (if selected it will be shown after the trend column [f]
first=t|f
Add the first row? [Default: f]

## Examples

Create 10000 numbers gaussian distributed with dispersion 1, observe the following:
```set n = 10000
seq \$n | tabmath - - ’rang(0,1)’ all seed=-1 |                             tabhist
- 1 -2 2 nmax=\$n
# sigma=1
seq \$n | tabmath - - ’rang(0,1)’ all seed=-1 | tabsmooth - |               tabhist
- 1 -2 2 nmax=\$n
# sigma=0.612 (sqrt(3/8))
seq \$n | tabmath - - ’rang(0,1)’ all seed=-1 | tabtrend -  |               tabhist
- 1 -2 2 nmax=\$n
# sigma=1.414 (sqrt(2))
seq \$n | tabmath - - ’rang(0,1)’ all seed=-1 | tabsmooth - | tabtrend -  | tabhist
- 1 -2 2 nmax=\$n
# sigma=0.5
seq \$n | tabmath - - ’rang(0,1)’ all seed=-1 | tabtrend -  | tabsmooth - | tabhist
- 1 -2 2 nmax=\$n
# sigma=0.5
```
Note that smoothing and trending are related, so their resulting dispersions in the last two examples do not multiply.

This also means if you don’t know if a signal had been applied a Hanning smoothing, compute the sigma before and after a difference operator. If that ratio is sqrt(2) , it means it was not, it was a pure un-correllated gaussian. However, if the ratio is sqrt(2/3) = 0.816, it was a Hanning smoothed signal to begin with.

tabsmooth(1NEMO) , tabmath(1NEMO) , nemoinp(1NEMO) , tabhist(1NEMO)

Peter Teuben

## Update History

```26-Nov-2012    finally documented    PJT
13-oct-2014    better examples        PJT