## The module "series_cell2mat" of the Mastrave modelling library

**Daniele de Rigo**

#### Copyright and license notice of the function series_cell2mat

Copyright © 2006,2007,2008,2009 Daniele de Rigo

The file series_cell2mat.m is part of Mastrave.

Mastrave is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Mastrave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Mastrave. If not, see http://www.gnu.org/licenses/.

#### Function declaration

[x_cols,y_cols] = series_cell2mat(x_series_cell,y_series_cell,sep)

#### Description

Rearranges a set of data series whose monodimensional domain (independent
variable) values are collected in ` x_series_cell ` and whose

`-dimensional codomain (`

**n**`dependent variables) values are collected in`

**n**`. This utility may help to visualize complex data using the standard 2-D plot facilities. See the example for an intuitive introduction. The codomain set of data`

**y_series_cell**`must be passed as a cell array of`

**y_series_cell**`matrices each of them representing an`

**n_param**`-dimensional data series. All data series must have the same number of`

**n**`vectors of data (i.e each matrix must be composed by`

**n_elem**`rows, each row being a row-vector of`

**n_elem**`columns; each column being a dimension of the codomain). The domain set of data`

**n**`can be passed as a cell array of`

**x_series_cell**`matrices each of them representing the domain values associated to the corresponding`

**n_param**`-dimensional data series. Alternatively,`

**n**`can be passed as a cell array of`

**x_series_cell**`column vectors, so implying that each dimension of the data series shares a common codomain set of values. Cell-arrays having only one element (a matrix of`

**n_param**`rows and`

**n_elem**`columns, or a column vector of`

**n**`rows) can be passed too. Values will be replicated to fit the size of`

**n_elem**`. If the domain or codomain data set is passed as matrix, it is regarded as the unique element of a cell-array. In case of multi-array elements, all dimensions beyond the second one are splitted in bidimensional slices and regarded as data matrices, each of them being an element of the cell-array.`

**y_series_cell**` x_series_cell ` and

`are rearranged to become matrices of`

**y_series_cell**`*`

**n_elem**`rows and`

**n_param**`columns. If the optional input argument`

**n**`is passed and its value is the string 'true', then each matrix element of the data series will be terminated with a trailing row of nan values. In this case the number of output matrices rows will be`

**sep**

`* (`**n_elem**`+ 1 ).`**n_param**

#### Input arguments

x_series_cellcolumn vector, matrix or cell array of column vectors ── or matrices ── all having the same size. It collects the values of the mono-dimensional independent variable.::cellnumeric::y_series_cellmatrix or cell array of matrices all having the same size. It collects the values of the::cellnumeric::-dimensional dependent variables.nsepstring to enable/disable the separation of each matrix with a row of nan values. Available categories are:::string::value │ behaviour ────────────┼───────────────────────────────────────────── 'true' │ Add to each matrix element of the data │ series a trailing row of nan values ────────────┼───────────────────────────────────────────── 'false' │ Don't add any trailing rowsep

#### Example of usage

version: 0.3.2

#### Support

The Mastrave modelling library is committed to provide reusable and general - but also robust and scalable - modules for research modellers dealing with computational science. You can help the Mastrave project by providing feedbacks on unexpected behaviours of this module. Despite all efforts, all of us - either developers or users - (should) know that errors are unavoidable. However, the free software paradigm successfully highlights that scientific knowledge freedom also implies an impressive opportunity for collectively evolve the tools and ideas upon which our daily work is based. Reporting a problem that you found using Mastrave may help the developer team to find a possible bug. Please, be aware that Mastrave is entirely based on voluntary efforts: in order for your help to be as effective as possible, please read carefully the section on reporting problems. Thank you for your collaboration.