Algorithms and data structures constitute programs. In Scilab, the matrix is probably the main structure. A vector is a matrix with dimension `1 by n' or `n by 1'. A real or a complex value can be considered as a `1 by 1' matrix. Scilab has a lot of functions that allow the treatment of matrices as a whole, being in most cases unnecessary to access the values that compose them. For instance, if `anymatrix' is a matrix the expression.
-->max(anymatrix)-min(anymatrix)
produces the range (maximum minus minimum) of the values integrated in `anymatrix'. The power of this kind of programming is double. On one side, we can extract some properties of the whole matrix without having to know any characteristic of it (such as the number of rows or columns) and on the other side the code is short and clear.
A matrix can be seen as something analogous to the different traces that compose a multichannel recording. In a sense, if we transfer the output of a multichannel analog-to-digital converter to a matrix of `n channels by m samples' we can see each column as events happening at the same time and each row as the output of one device (an amplifier, a sensor, etc).
Now, we are going to introduce some general facts about how Scilab gives us the possibility of manipulating neurophysiological signals.