| TSTOOL home page | TSTOOL documentation page | TSTOOL link page |
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)
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)
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)
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/viewat 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)
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.
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.
Class description is the second base class of class signal. An object of type description stores all descriptive information belonging to a signal.
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).
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.
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
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.