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

Next: 6.22 Class core Up: 6.21 Class description Previous: 6.21.2 Attributes
Subsections

- 6.21.3.1 addcommandlines
- 6.21.3.2 addcomment
- 6.21.3.3 addhistory
- 6.21.3.4 commandlines
- 6.21.3.5 comment
- 6.21.3.6 creator
- 6.21.3.7 description
- 6.21.3.8 display
- 6.21.3.9 history
- 6.21.3.10 label
- 6.21.3.11 makescript
- 6.21.3.12 merge
- 6.21.3.13 name
- 6.21.3.14 newcomment
- 6.21.3.15 optparams
- 6.21.3.16 plothint
- 6.21.3.17 setlabel
- 6.21.3.18 setname
- 6.21.3.19 setoptparams
- 6.21.3.20 setplothint
- 6.21.3.21 settype
- 6.21.3.22 setyname
- 6.21.3.23 setyunit
- 6.21.3.24 type
- 6.21.3.25 yname
- 6.21.3.26 yunit

## 6.21.3 Member functions

###
6.21.3.1 addcommandlines

adds new commandline to list of commands that have been applied to that signal

example 1
  `addcommandlines(s, 's = spec2(s', 512, 'Hanning' ))` will add '`s = spec2(s, 512, 'Hanning');`' to the list of applied commands
example 2
  `len = 512; text = 'Hanning'; addcommandlines(s, 's = spec2(s', 512, 'Hanning' ))` will add '`s = spec2(s, 512, 'Hanning');`' to the list of applied commands

###
6.21.3.2 addcomment

adds new comment to current list of comments

###
6.21.3.3 addhistory

adds text to current history list always the current time and date is written into the first line

###
6.21.3.4 commandlines

###
6.21.3.5 comment

###
6.21.3.6 creator

###
6.21.3.7 description

description class constructor Syntax:

- `d = description()`
- `d = description(name)`
- `d = description(name, type)`
- `d = description(yunit)`

An object of class description contains auxiliary descriptive information for a signal, e.g. information about data unit, creator, how the signal should be plotted, a user specified comment text, a processing history and the commandlines that were used to generate this signal

###
6.21.3.8 display

description/display

###
6.21.3.9 history

description/history

###
6.21.3.10 label

###
6.21.3.11 makescript

Syntax:

- `makescript (signal, scriptfilename)`

creates a Matlab m-file that contains exactly the the processing steps that have been applied to get the input signal. This gives a kind of macro facility for tstool.

Example
  signal `s` was calculated through several processing steps from signal `s0` (the raw or original signal) Now `makescript(s, 'foo.m')` will create a Matlab m-file named foo.m which, applied to `s0`, will give `s`.

###
6.21.3.12 merge

Syntax:

- `d = merge(d1, d2)`

merge two descriptions
Most items are taken from first description. History is taken from both descriptions. This function may be useful when writing binary operators for class signal

###
6.21.3.13 name

description/name Syntax:

- `n = name(d)`

Get signal's name

###
6.21.3.14 newcomment

Syntax:

- `d = newcomment(d, string)`
- `d = newcomment(d, list)`

Replace old comment with new comment

###
6.21.3.15 optparams

Syntax:

- `param = optparams(d, nr)`

get optional parameter number `nr`

###
6.21.3.16 plothint

###
6.21.3.17 setlabel

Syntax:

- `d = setlabel(d, label)`

the label field of a description is used to give a signal some 'tag' which remains constant through various processing steps
e.g. which topic this signal belongs to

###
6.21.3.18 setname

Syntax:

- `d = setname(d, name)`

the name field of a descriptiom is used when the signal is loaded from file, it will not be continued through several processing steps

###
6.21.3.19 setoptparams

Syntax:

- `d = setoptparams(d, nr, param)`

set optional parameter number `nr`

###
6.21.3.20 setplothint

###
6.21.3.21 settype

Syntax:

- `d = settype(d, string)`

Set a new type for signal

###
6.21.3.22 setyname

Syntax:

- `d = setyunit(d, string)`

Set signal's y-name
e.g. `d = setyunit(d, 'V')`

###
6.21.3.23 setyunit

Syntax:

- `d = setyunit(d, unit)`
- `d = setyunit(d, string)`

Set signal's y-unit
e.g. `d = setyunit(d, 'V')`

###
6.21.3.24 type

return signal type (e.g. 'Correlation function', 'Spectrogram' etc.)

###
6.21.3.25 yname

return name of the measured data (e.g. 'Heartbeat rate', 'Current' etc.)

###
6.21.3.26 yunit

return y-unit of the sampled data values (e.g. Volt, Pa etc.)

Next: 6.22 Class core Up: 6.21 Class description Previous: 6.21.2 Attributes Contents