TSTOOL home page | TSTOOL documentation page | TSTOOL link page |

- 6.20.3.1 abs
- 6.20.3.2 acf
- 6.20.3.3 acp
- 6.20.3.4 amutual
- 6.20.3.5 amutual2
- 6.20.3.6 analyze
- 6.20.3.7 arch
- 6.20.3.8 boxdim
- 6.20.3.9 cao
- 6.20.3.10 center
- 6.20.3.11 corrdim
- 6.20.3.12 corrsum
- 6.20.3.13 corrsum2
- 6.20.3.14 crosscorrdim
- 6.20.3.15 cut
- 6.20.3.16 db
- 6.20.3.17 delaytime
- 6.20.3.18 diff
- 6.20.3.19 dimensions
- 6.20.3.20 display
- 6.20.3.21 embed
- 6.20.3.22 fft
- 6.20.3.23 filterbank
- 6.20.3.24 firstmax
- 6.20.3.25 firstmin
- 6.20.3.26 firstzero
- 6.20.3.27 fracdims
- 6.20.3.28 getaxis
- 6.20.3.29 gmi
- 6.20.3.30 histo
- 6.20.3.31 infodim
- 6.20.3.32 infodim2
- 6.20.3.33 int
- 6.20.3.34 intspikeint
- 6.20.3.35 intspikint
- 6.20.3.36 largelyap
- 6.20.3.37 level_adaption
- 6.20.3.38 localdensity
- 6.20.3.39 max
- 6.20.3.40 medianfilt
- 6.20.3.41 merge
- 6.20.3.42 min
- 6.20.3.43 minus
- 6.20.3.44 movav
- 6.20.3.45 multires
- 6.20.3.46 nearneigh
- 6.20.3.47 norm1
- 6.20.3.48 norm2
- 6.20.3.49 pca
- 6.20.3.50 plosivity
- 6.20.3.51 plus
- 6.20.3.52 poincare
- 6.20.3.53 power
- 6.20.3.54 predict
- 6.20.3.55 predict2
- 6.20.3.56 rang
- 6.20.3.57 removeaxis
- 6.20.3.58 return_time
- 6.20.3.59 reverse
- 6.20.3.60 rms
- 6.20.3.61 scale
- 6.20.3.62 scalogram
- 6.20.3.63 setaxis
- 6.20.3.64 setunit
- 6.20.3.65 shift
- 6.20.3.66 signal
- 6.20.3.67 spacing
- 6.20.3.68 spec
- 6.20.3.69 spec2
- 6.20.3.70 stts
- 6.20.3.71 sttserror
- 6.20.3.72 surrogate1
- 6.20.3.73 surrogate2
- 6.20.3.74 surrogate3
- 6.20.3.75 surrogate_test
- 6.20.3.76 swap
- 6.20.3.77 takens_estimator
- 6.20.3.78 tc3
- 6.20.3.79 trend
- 6.20.3.80 trev
- 6.20.3.81 upsample
- 6.20.3.82 view
- 6.20.3.83 write

`abs(s)`

Take absolut value of all data values of signal `s`. If sample
values are complex, `abs(s)` returns the complex modulus (magnitude) of each sample.

6.20.3.2 acf

`acf(s, len)`

**Input arguments:**

`len`-length of the fft*(optional)*

Autocorrelation function for real scalar signals, using fft (of length `len`). If `len` is ommited a default value is calculated. The maximum
of the calculated length is 128.

`acp(s, tau, past, maxdelay, maxdim, nref)`

**Input arguments:**

`tau`- proper delay time for`s``past`- number of samples to exclude before and after reference index (to avoid correlation effects)`maxdelay`- maximal delay (should be much smaller than the lenght of`s`)*(optional)*`maxdim`- maximal dimension to use*(optional)*`nref`- number of reference points*(optional)*

`amutual(s, maxtau, bins)`

`maxtau`- maximal delay (should be much smaller than the lenght of`s`)*(optional)*`bins`- number of bins used for histogram calculation*(optional)*

`amutual2(s, len)`

**Input arguments:**

`len`- maximal lag

Auto mutual information (average) function for real scalar signals using 128 equidistant partitions.

`analyze(s, maxdim)`

`maxdim`- analyze will not use a dimension higher than this limit

Try to do a automatic analysis procedure of a time series. The time series is embedded using the first zero of the auto mutual information function for the delay time.

`[rs, archetypes]=arch(s, na, mode='normalized')`

**Input arguments:**

`na`- number of generated archetypes`mode`- mode can be one of the following : '`normalized`' , '`mean`', '`raw`'*(optional)*

- each row of data is one 'observation', e.g. the sample values of all channels in a multichannel measurement at one point in time
- in mode '
`normalized`' each column of data is centered by removing its mean and then normalized by dividing through its standard deviation before the covariance matrix is calculated - in mode '
`mean`' only the mean of every column of data is removed - in mode '
`raw`' no preprocessing is applied to data

`rs = boxdim(s, bins)`

`s`- data points (row vectors)`bins`- maximal number of partition per axis*(optional)*

Compute the boxcounting (capacity) dimension of a time-delay reconstructed
timeseries `s` for dimensions from 1 to `D`, where `D` is the
dimension of the input vectors using boxcounting approach. The default number
of bins is 100.

6.20.3.9 cao

`[E1, E2] = cao(s, maxdim, tau, NNR, Nref)`

`s`- scalar input signal`maxdim`- maximal dimension`tau`- delay time`NNR`- number of nearest neighbor to use`Nref`- number of reference points (-1 means: use all points)

Estimate minimum embedding dimension using Cao's method.

The second output argument, `E2`, can be used to distinguish between
deterministic and random data.

`center(s)`

Center signal by removing it's mean.

6.20.3.11 corrdim

`rs = corrdim(s, bins)`

`s`- data points (row vectors)`bins`- maximal number of partition per axis*(optional)*

Compute the correlation dimension of a time-delay reconstructed timeseries s
for dimensions from 1 to `D`, where `D` is the dimension of the input vectors
using boxcounting approach. The default number of `bins` is 100.

6.20.3.12 corrsum

`rs = corrsum(s, n, range, past, bins)`

`n`- number of randomly chosen reference points (`n`== -1 means: use all points)`range`- maximal relative search radius (relative to attractor size) 0..1`past`- number of samples to exclude before and after each reference index`bins`- number of bins*(optional)*

6.20.3.13 corrsum2

`rs = corrsum2(s, npairs, range, past, bins)`

`npairs`- number of pairs per bins`range`- maximal relative search radius (relative to attractor size) 0..1`past`- number of samples to exclude before and after each reference index`bins`- number of bins (optional), defaults to 32

6.20.3.14 crosscorrdim

`rs = crosscorrdim(s, s2, n, range, past, bins)`

`n`- number of randomly chosen reference points (n == -1 means : use all points)`range`- maximal relative search radius (relative to size of data set s2) 0..1`past`- number of samples to exclude before and after each reference index`bins`- number of bins*(optional)*

6.20.3.15 cut

`rs = cut(s, dim, start, stop)`

`dim`- dimension along which the signal is cutted`start`- position where to start the cut`stop`- position where to stop*(optional)*

6.20.3.16 db

`db(s, dbmin)`

6.20.3.17 delaytime

`tau = delaytime(s, maxdelay, past)`

`maxdelay`- maximal delay time`past`- ?

6.20.3.18 diff

`diff(s, nth)`

6.20.3.19 dimensions

`[bc,in,co] = dimensions(s, bins)`

`s`- data points (row vectors)`bins`- maximal number of partition per axis, default is 100

`bc`- scaling of boxes with partititon sizes`in`- scaling of information with partititon sizes`co`- scaling of correlation with partititon sizes

Scale data to be within 0 and 1. Give a sortiment of (integer) partitionsizes with almost exponential behaviour.

6.20.3.20 display

6.20.3.21 embed

`emb = embed(s, dim, delay, shift, windowtype)`

`dim`- embedding dimension`delay`- time delay*(optional)*`shift`- shift for two sequent time delay vectors*(optional)*`windowtype`- type of window*(optional)*

`emb`- n by`dim`array, each row contains the coordinates of one point

6.20.3.22 fft

`f = fft(s)`

`f`- n by 2 array, the first column contains the magnitudes, the second one the phases.

6.20.3.23 filterbank

`filterbank(s, depth, filterlen)`

6.20.3.24 firstmax

`[xpos, unit] = firstmax(s)`

6.20.3.25 firstmin

`[xpos, unit] = firstmin(s)`

6.20.3.26 firstzero

`[xpos, unit] = firstzero(s)`

6.20.3.27 fracdims

`rs = fracdims(s, kmin, kmax, Nref, gstart, gend, past, steps)``rs = fracdims(s, kmin, kmax, Nref, gstart, gend, past)``rs = fracdims(s, kmin, kmax, Nref, gstart, gend)`

`kmin`- minimal number of neighbors for each reference point`kmax`- maximal number of neighbors for each reference point`Nref`- number of randomly chosen reference points (n == -1 means : use all points)`gstart`- starting value for moments`gend`- end value for moments`past`- (optional) number of samples to exclude before and after each reference index, default is 0`steps`- (optional) number of moments to calculate, default is 32

Do the main job - computing nearest neighbors for reference points.

6.20.3.28 getaxis

`a = getaxis(s, dim)`

6.20.3.29 gmi

`gmi(s, D, eps, NNR, len, Nref)`

`D`-`eps`-`NNR`-`len`-`Nref`-

6.20.3.30 histo

`histo(s, partitions)`

6.20.3.31 infodim

`rs = infodim(s, bins)`

`s`- data points (row vectors)`bins`- maximal number of partition per axis, default is 100

6.20.3.32 infodim2

`rs = infodim2(s, n, kmax, past)`

`n`- number of randomly chosen reference points (n == -1 means : use all points)`kmax`- maximal number of neighbors for each reference point`past`- number of samples to exclude before and after each reference index

Numerically compute first derivative of after .

6.20.3.33 int

`int(s)`

6.20.3.34 intspikeint

`rs = intspikeint(s)`

6.20.3.35 intspikint

`rs = intspikeint(s)`

6.20.3.36 largelyap

`rs = largelyap(s, n, stepsahead, past, nnr)`

`n`- number of randomly chosen reference points (-1 means: use all points)`stepsahead`- maximal length of prediction in samples`past`- exclude`nnr`- number of nearest neighbours*(optional)*

`rs`-

6.20.3.37 level_adaption

`level_adaption(s, timeconstants, dynamic_limit, threshold)`

Higher values for time constants will result in slower adaption speed.
Short time changes in the signal will be transmitted almost linearily.
In each feedback loop, a nonlinear compressing characteristic (see
Stefan Münkner 1993) limits the signal values to be within
`[-dynamic_limit dynamic_limit]`. A low value for `dynamic_limit` will
introduce nonlinear distortions to the signal.

To prevent the feedback loops from adapting to a zero level (in case all input values are zero), a tiny threshold is given as 4th argument. The scaling factors will not shrink below this threshold.

6.20.3.38 localdensity

`rs = localdensity(s, n, past)`

`n`- number of nearest neighbour to compute`past`- a nearest neighbour is only valid if it is as least`past`timesteps away from the reference point`past`= 1 means: use all points but`ref_point`itself

6.20.3.39 max

`[maximum, yunit, xpos, xunit] = max(s)`

**Example:**

disp('maximum of signal : ') disp(['y = ' num2str(m) ' ' label(yunit(s))]); disp(['x = ' num2str(xpos) ' ' label(a)]);

6.20.3.40 medianfilt

`rs = medianfilt(s, len)`

6.20.3.41 merge

`merge(signal1, signal2, dB)``merge(signal1, signal2)`

`signal1, signal2`- Signals`dB`- energy ratio, (optional, default = 0)

6.20.3.42 min

`[minimum, yunit, xpos, xunit] = min(s)`

**Example:**

disp('minimum of signal : ') disp(['y = ' num2str(m) ' ' label(yunit(s))]); disp(['x = ' num2str(xpos) ' ' label(a)]);

6.20.3.43 minus

`rs=minus(s, offset)``rs=minus(s1,s2)`

`s, s1, s2`- signal object`offset`- scalar value

6.20.3.44 movav

`rs = movav(s, len, windowtype)``rs = movav(s, len)`

6.20.3.45 multires

`rs = multires(s) => scale=3``rs = multires(s, scale)`

Results are given in a `scale+1` channels. The first scale
channels are the details corresponding to the scales
to
the last row contains the
approximation at scale
. The original signal can be
restored by summing all the channels of the resulting signal.

6.20.3.46 nearneigh

`rs = nearneigh(s, n) => past=1``rs = nearneigh(s, n, past)`

`n`- number of nearest neighbour to compute`past`- a nearest neighbour is only valid if it is as least past timesteps away from the reference point. past = 1 means: use all points but`ref_point`itself

6.20.3.47 norm1

`rs=norm1(s) => low=0 , upp=1``rs=norm1(s, low) => upp=1``rs=norm1(s, low, upp)`

6.20.3.48 norm2

`rs=norm2(s)`

6.20.3.49 pca

`[rs, eigvals, eigvecs] = pca(s) => mode='normalized' , maxpercent = 95``[rs, eigvals, eigvecs] = pca(s, mode) => maxpercent = 95``[rs, eigvals, eigvecs] = pca(s, mode, maxpercent)`

- each row of data is one 'observation', e.g. the sample values of all channels in a multichannel measurement at one point in time
`mode`can be one of the following :`'normalized'`(default),`'mean', 'raw'`- in mode
`'normalized'`each column of data is centered by removing its mean and then normalized by dividing through its standard deviation before the covariance matrix is calculated - in mode
`'mean'`only the mean of every column of data is removed - in mode
`'raw'`no preprocessing is applied to data

- in mode
`maxpercent`gives the limit of the accumulated percentage of the resulting eigenvalues, default is 95 %

6.20.3.50 plosivity

`rs = plosivity(s, blen) => flen=1 , thresh=0, windowtype = 'Rect'``rs = plosivity(s, blen, flen) => thresh=0, windowtype = 'Rect'``rs = plosivity(s, blen, flen, thresh) => windowtype = 'Rect'``rs = plosivity(s, blen, flen, thresh, windowtype)`

6.20.3.51 plus

`rs=plus(s, offset)``rs=plus(s1, s2)`

6.20.3.52 poincare

`rs=poincare(s, ref)`

6.20.3.53 power

`power(s)`

6.20.3.54 predict

`rs = predict(s, dim, delay, len) => nnr=1``rs = predict(s, dim, delay, len, nnr) => mode=0``rs = predict(s, dim, delay, len, nnr, mode)`

`dim`- dimension for time-delay reconstruction`delay`- delay time (in samples) for time-delay reconstruction`len`- length of prediction (number of output values)`nnr`- number of nearest neighbors to use (default is one)`step`- stepsize (in samples) (default is one)`mode`:- 0 = Output vectors are the mean of the images of the nearest neighbors
- 1 = Output vectors are the distance weighted mean of the images of the nearest neighbors
- 2 = Output vectors are calculated based on the local flow using the mean of the images of the neighbors
- 3 = Output vectors are calculated based on the local flow using the weighted mean of the images of the neighbors

6.20.3.55 predict2

`rs = predict2(s, len, nnr, step, mode)`

`len`- length of prediction (number of output values)`nnr`- number of nearest neighbors to use (default is one)`step`- stepsize (in samples) (default is one)`mode`:- 0 = Output vectors are the mean of the images of the nearest neighbors
- 1 = Output vectors are the distance weighted mean of the images of the nearest neighbors
- 2 = Output vectors are calculated based on the local flow using the mean of the images of the neighbors
- 3 = Output vectors are calculated based on the local flow using the weighted mean of the images of the neighbors

6.20.3.56 rang

`rs = rang(s)`

6.20.3.57 removeaxis

`s = removeaxis(s, dim)`

6.20.3.58 return_time

`rs = return_time(s, nnr, maxT) => past=1``rs = return_time(s, nnr, maxT, past)``rs = return_time(s, nnr, maxT, past, N)`

`nnr`- number of nearest neighbors`maxT`- maximal return time to consider`past`- a nearest neighbor is only valid if it is as least past timesteps away from the reference point past = 1 means: use all points but tt ref_point itself`N`- number of reference indices

6.20.3.59 reverse

`rs=reverse(s)`

6.20.3.60 rms

`rs = rms(s)`

6.20.3.61 scale

`scale(signal, factor)`

6.20.3.62 scalogram

`rs = scalogram(s) => scalemin=0.1``rs = scalogram(s, scalemin) => scalemax=1``rs = scalogram(s, scalemin, scalemax) => scalestep=0.1``rs = scalogram(s, scalemin, scalemax, scalestep) => mlen=10``rs = scalogram(s, scalemin, scalemax, scalestep, mlen)`

6.20.3.63 setaxis

`s = setaxis(s, dim, achse)`

6.20.3.64 setunit

`s = setunir(s, dim, u)`

6.20.3.65 shift

`s = shift(s, distance)`(dim=1)`s = shift(s, distance, dim)`

6.20.3.66 signal

`s = signal(array)`creates a new signal object from a data array

`array`the data inside the object can be retrieved with`x = data(s)`;`s = signal(array, achse1, achse2, ...)`creates a new signal object from a data array

`array`, using`achse1`etc. as xachse entries`s = signal(array, unit1, unit2, ...)`creates a new signal object from a data array 'array', using unit1 etc. to create xachse objects

`s = signal(array, samplerate1, samplerate2, ...)`creates a new signal object from a data array

`array`, using as xunit 's' (second) and scalar`samplerate1`as samplerate(s)

A signal object contains signal data, that is a collection of real or complex valued samples. A signal can be one or multi-dimensional. The number of dimensions is the number of axes that are needed to describe the the data.

An example for an one-dimensional signal is a one-channel measurement (timeseries), or the power spectrum of a one-channel measurement. An example for a two-dimensional signal is a twelve-channel measurement, with one time axis and a 'channel' axis. Another example for a two-dimensional signal is a short time spectrogramm of a time series, where we have a time axis and a frequency axis.

Each axis can have a physical unit(e.g. 's' or 'Hz'), a starting point and a step value. E.g. if a time-series is sampled with 1000 Hz, beginning at 1 min 12 sec, the unit is 's', the starting point is 72 and the step value (delta) is 0.001.

But not only the axes have physical units, also the sample value themselve can have a unit, maybe 'V' or 'Pa', depending on what the sampled data represent (=> yunit)

All units are stored as objects of class 'unit', all axes are stored as objects of class 'achse' (this somewhat peculiar name was chosen because of conflicts with reserved matlab keywords 'axis' and 'axes', which otherwise would have been the first choice).

Example for creating a 2-dimensional signal with y-unit set to 'Volt', the first dimension's unit is 'second' (time), the second dimension's unit is 'n' (Channels).

**Examples:**

tmp = rand(100, 10); s = signal(tmp, unit('s'), unit('n')); s = setyunit(s, unit('V')); s = addcomment(s, 'Example signal with two dimensions')

- Loading from disk
s = signal(filename)

loads a previously stored signal object - Importing from other file formats:
ASCII: s = signal('data/spalte1.dat', 'ASCII') WAVE: s = signal('data/Sounds/hat.wav', 'WAVE') AU (SUN AUDIO): s = signal('data/Sounds/hat.au', 'AU') (old) NLD-Format : s = signal('test.nld', 'NLD')

6.20.3.67 spacing

`v = spacing(s)`(dim=1)`v = spacing(s, dim)`

6.20.3.68 spec

- rs = spec(s)

6.20.3.69 spec2

`rs = spec2(s)`

`fensterlen`- size of window*(optional)*`fenster`- window type*(optional)*`vorschub`- shift in samples*(optional)*

**Examples:**

view(spec2(sine(10000, 1000, 8000), 512, 'Hanning'))

6.20.3.70 stts

`rs = stts(s, I)`(J=0, K=1, L=1)`rs = stts(s, I, J)`(K=1, L=1)`rs = stts(s, I, J, K)`(L=1)`rs = stts(s, I, J, K, L)`

`s`- input data set of N snapshots of length M, given as N by M matrix`I`- number of spatial neighbours`J`- number of temporal neighbours (in the past)`K`- spatial shift (= spatial delay)`L`- temporal delay

6.20.3.71 sttserror

`rs = sttserror(s1, s2)`

`s1`- original signal`s2`- predicted signal

see U. Parlitz

6.20.3.72 surrogate1

`rs = surrogate1(s)`

see : James Theiler et al.'Using Surrogate Data to Detect Nonlinearity in Time Series', APPENDIX : ALGORITHM I

6.20.3.73 surrogate2

`rs = surrogate2(s)`

see : James Theiler et al.'Using Surrogate Data to Detect Nonlinearity in Time Series', APPENDIX : ALGORITHM II

6.20.3.74 surrogate3

`rs = surrogate3(s)`

6.20.3.75 surrogate_test

`rs=surrogate_test(s, ntests, method,func)`

`s`- has to be a real, scalar signal`ntests`- is the number of surrogate data sets to create`method`- method to generate surrogate data sets:- 1: surrogate1
- 2: surrogate2
- 3: surrogate3

`func`- string with matlab-code, have to return a signal object with a scalar time series. The data to process is a signal object referred by the qualifier`s`(see example).

`rs`is a signal object with a three dimensional time series. The first component is the result of the`func`function applied to the original data set`s`. The second component is the mean of the result of the`func`function applied to the`ntests`surrogate data sets. The third component is the standard deviation. There is a special`plothint`('surrerrorbar') for the`view`function to show this result in the common way.

**Example:**

st = surrogate_test(s, 10, 1, 1, 'largelyap(embed(s,3,1,1), 128,20,10);');

6.20.3.76 swap

`rs = swap(s)`(exchange dimension 1 and dimension 2)`rs = swap(s, dim1, dim2)`

6.20.3.77 takens_estimator

`D2 = takens_estimator2(s, n, range, past)`

`n`- number of randomly chosen reference points (n == -1 means : use all points)`range`- maximal relative search radius (relative to attractor size) 0..1`past`- number of samples to exclude before and after each reference index

6.20.3.78 tc3

`rs = tc3(s,tau,n,method)`

`tau`- see explaination below`n`- number of surrogate data sets to generate`method`- method to generate the surrogate data sets:- 1:
`surrogate1` - 2:
`surrogate2` - 3:
`surrogate3`

- 1:

`rs`is a row vector, returned as signal object. The first item is the value for the original data set`s`. The following`n`values are the values for the generated surrogates. There exist a special`plothint`('surrbar') for the`view`function to show this kind of result in the common way.

This function calculates a special value for the original data set and
the `n` generated surrogate data sets. The
value is
defined as followed:

In terms of surrogate data test this is a test statistics for higher order moments. The original

6.20.3.79 trend

`rs = trend(s, len)`

calculate moving average of width

6.20.3.80 trev

`rs = trev(s,tau,n,method)`

`tau`- see explaination below`n`- number of surrogate data sets to generate`method`- method to generate the surrogate data sets:- 1:
`surrogate1` - 2:
`surrogate2` - 3:
`surrogate3`

- 1:

`rs`is a row vector, returned as signal object. The first item is the value for the original data set`s`. The following`n`values are the values for the generated surrogates. There exist a special`plothint`('surrbar') for the`view`function to show this kind of result in the common way.

This function calculates a special value for the original data set and
the `n` generated surrogate data sets. The
value is
defined as followed:

In terms of surrogate data test this is a test statistics for time reversibility. The original

6.20.3.81 upsample

`rs = upsample(s, factor, method)`

`method`may be one of the following :`'fft'``'spline'``'akima'``'nearest'``'linear'``'cubic'`

`s`has be to sampled equidistantly for fft interpolation

6.20.3.82 view

`view(signal)`(fontsize=12)`view(signal, fontsize)``view(signal, fontsize, figurehandle)`

Possible plothints are:

`'graph'``'bar'``'surrbar'``'surrerrorbar'``'points'``'xyplot'``'xypoints'``'scatter'``'3dcurve'``'3dpoints'``'spectrogram'``'image'``'multigraph'``'multipoints'``'subplotgraph'`

6.20.3.83 write

`write(s, filename)`(writes in TSTOOL's own file format)`write(s, filename, 'ASCII')``write(s, filename, 'WAV')`(RIFF WAVE FORMAT)`write(s, filename, 'AU')`(SUN AUDIO FORMAT)`write(s, filename, 'NLD')`(old NLD FORMAT)`write(s, filename, 'SIPP')`(si++ file format)

Copyright © 1997-2009 DPI Göttingen