TSTOOL home page | TSTOOL documentation page | TSTOOL link page

next up previous contents
Next: 7.2.4 Extending TSTOOL Up: 7.2 Answers Previous: 7.2.2 Installation of TSTOOL

Subsections

7.2.3 Working with TSTOOL

7.2.3.1 How do I create a signal from my time-series data ?

Suppose the time-series data is given as the row vector y.

 
>> s = signal(y)
>> view(s)

If y is a column vector, the following syntax must be used:

 
>> s = signal(y')
>> view(s)

Suppose the data was recorded with a samplerate of 8 kHz :

>> s = signal(y, 8000)
>> view(s)

7.2.3.2 How do I create a signal with logarithmic spacing ?

Suppose you have data vector y whose values were recorded at 3 Hz, 6 Hz, 12 Hz, 24 Hz ...

 
a = achse(unit('Hz'), 3, 2, 'log')
s = signal(y, a)
view(s)

7.2.3.3 How do I create a signal from non-uniformly sampled data ?

Suppose you have a data vector y (of length 4) whose values were recorded at 3 Hz, 5 Hz, 8 Hz, 14.5 Hz

 
a = achse(unit('Hz'), [3 5 8 14.5])
s = signal(y, a)
view(s)

7.2.3.4 How do I change the type of plot that I get with view ?

The way view plots a signal depends on the attributes of the signal. It is possible to give view a hint which type of plot to prefer. This hint can be set with the command setplothint. The possible plot types can be obtained by issuing

 help signal/view
at the Matlab prompt. However, if the signal does not support the desired type of plotting (e.g. a one-dimensional time-series can not be visualized as orbit), view will use the default plot type for the data.
 
s = signal(rand(1000, 3)); 
s = setplothint(s, '3dpoints'); 
view(s)

7.2.3.5 What is class 'signal' for ?

Class signal is TSTOOL's main class. Objects of this type model real world signals. A signal does not only store the pure sample values, it holds much more information like axes, units of sample values or the axes units, and even more descriptive information like labels, command lines and a processing history.

The majority of functions in the tstoolbox take a signal as input argument and return a processed signal as output. This allows for combining or chaining of several processing steps in order to get the desired output.

7.2.3.6 What is class 'core' for ?

Class core is a base class of class signal. An object of type core stores the pure sample values of a signal, without any additional descriptive information. The separation of the numerical and the descriptive part of a signal simplifies the writing of m-files that work on signals.

7.2.3.7 What is class 'description' for ?

Class description is the second base class of class signal. An object of type description stores all descriptive information belonging to a signal.

7.2.3.8 What is class 'achse' for ?

Class achse models an axis, e.g. a time axis or a frequency axis. A signal has a least one axis (if it is a one dimensional signal). A multidimensional signal has several achse objects, one for each dimension. An achse object is basically described by an object of class unit and the spacing values. The spacing may be linear, logarithmic or arbitrary (in case of non-uniform sampling).

7.2.3.9 Why is class 'achse' called 'achse' and not 'axis' ?

The names axis and axes are already occupied in Matlab. So, achse, which is the german translation of axis, was used as name for that class.

7.2.3.10 What is class 'unit' for ?

Objects of class 'unit' try to model physical units. No one wonders that his computer can multiply real or complex numbers. But in physics or engineering, you also have to mulitply or divide physical units, just think of Ohm's law : R = U/I

7.2.3.11 How is class 'unit' used in TSTOOL ?

Class unit is used as a part of every achse object and as part of a description object. Handling and processing of units is optional for functions that work on signals, because many nonlinear signal analysis functions do not allow consistent handling of units.


next up previous contents
Next: 7.2.4 Extending TSTOOL Up: 7.2 Answers Previous: 7.2.2 Installation of TSTOOL   Contents
TSTOOL

Copyright © 1997-2009 DPI Göttingen