Contents Functions PDF Index |

Purpose

fe_range commands are used to manipulate experiment (series of design points) specifications.

Description

A range is the description of a set of experiments through a data structure with fields

- .val numeric array containing one design point per row and one design parameter per column.
- .lab cell array of strings giving a parameter label for each column. These labels should be acceptable fieldnames (no spaces, braces, ...)
- .param optional structure with fields associated with parameter labels used for formatting and analysis. Accepted values are detailed below. It is not necessary to define a .param field for each design parameter.
- .edge optional connectivity matrix used to define lines connecting different design points of the experiment

.param fields must match string values in .lab. Each field is a struct with possible fields

- .type a string. Typically double or pop.
- .choices, for .type='pop', contains a cell array of strings. The parameter value then gives the index within .choices.
- .data possible cell array containing data associated with the .choices field.
- .LabFcn a command to be evaluated with st1=eval(r2.LabFcn) to generate the proper label. For example 'sprintf(”%.1f ms”,val/1000)' is used to generate a label in a different unit. For choices, the default is r2.choices{val};.
- .Xlab long name to be used to fill Xlab when generating curve data structures.
- .level is an integer specifying the computational step at which a given parameter can be modified. This is used to generate experiment trees.
- .uProp is a cell array giving a coefficient to go from value to engineering unit and an string for the unit.

Commands

Range=fe_range('Grid',par);

Range is defined by a grid of all the parameter values defined in par.

par is expected to be a cell array with as many elements as parameters. Each cell can be

- a string 'lab "label" min min max max cur cur scale "scale" NPoints NPoints'. "label" is the parameter name. Then the minimum, maximum and nominal values are defined. Scale can be "lin" for linear scale or "log" for logarithmic scale. NPoints defines the number of point for the parameter vector.
- a range data structure
- a numeric vector in the old upcom format [type cur min max scale] with type defining the matrix type (unused here), scale==2 indicates a logarithmic variation.

par can also be a matrix following the model of the visco tools parameters definition (see fevisco Range for more details).

As an illustration, following example defines a grid 6x7 of 2 parameters named length and thickness:

par={'lab "length" min 10 max 20 cur 10 scale "lin" NPoints 6',... 'lab "thickness" min 1e-3 max 2e-3 cur 0 scale "log" NPoints 7'}; Range=fe_range('Grid',par);

R1=fe_range('Res',R1,Range);

This command reshapes the last dimension of the result curve R1 according to the Range. For a grid DOE last dimension is split in as many dimensions as parameters. For a vector DOE, last dimension is only redefined by a cell array of labels defining each design point.

This command allows selection of design points in a DOE. Provided a Range DOE structure, it will return the indices in the val field corresponding to the sequential application of selection rules.

The selection rules a provided in a cell array of three columns and as many lines as rules to apply under the format

{param_name,'rule','crit';...}.

The following types of rules are supported, defined by a string,

- ismember applies selection by only taking the values specified using MATLAB ismember command. crit is then either a list of values (then corresponding to values appearing in the DOE table), or a cell array of values (then corresponding to the values in the DOE table where string values are used for pop style parameters. Regular expressions are supported for the pop entries, in which case the string must start by # followed by the regular expression to apply.
- <,>,<=,>=,== applies sampling by using the logical operator specified on the parameter values. crit is then a numerical value corresponding to the values appearing in the DOE table for all parameters.
- sort applies a sorting algorithm for a given parameter. crit is then either
- a string specifying an argument to the sort command of MATLAB, either ascend or descend. Support for pop types is provided based on alphabetical sorting.
- a function_handle to a sorting function that will be called with the val or choices field of the parameter and that will rethrow the sorted values and the corresponding index to the unsorted values.
- a cell array callback with first field a function_handle that will be called, the second entry will be replaced by the val or choices field of the parameter, and any further entries provided.

- sortrows will perform a post-treatment of the sampled Range to the selection applied and output a java compatible table.

Excepted for sortrows, other rules are sequentially applied to the current sampled Range. Sorting is thus only fully effective if last performed.

Generates a DOE model with sequential variation of each parameter, the other ones being fixed to their nominal value. par has the same format than for the fe_range Grid input. They may feature a field nom providing a nominal value to each parameter, if this field is omitted the nominal value is considered to be the starting value of the parameter. In the case where par has been defined as a string input, field nom is taken to be the cur input value.

par={'lab "length" min 10 max 20 cur 10 scale "lin" NPoints 6',... 'lab "thickness" min 1e-3 max 2e-3 cur 0 scale "log" NPoints 7'}; Range=fe_range('Simple',par);

Range=fe_range('Vect',par);

Simply concatenate all parameter ranges (they must have the same length) into a functional Range. par has the same format than for the fe_range Grid input. In addition, all par entries provided should have the same number of points.

Vect command is used to generate single par structures to feed Range.param entries.

par={'lab "length" min 10 max 20 cur 10 scale "lin" NPoints 7',... 'lab "thickness" min 1e-3 max 2e-3 cur 0 scale "log" NPoints 7'}; Range=fe_range('Vect',par);

See also

©1991-2014 by SDTools