compareMetaDataBackwardRef: logical[1,1] if true, the CubeStruct's
referenced from the meta data objects are also compared
maxRelativeTolerance: double [1,1] - maximum allowed
relative tolerance
Output:
isEq: logical[1,1] - result of comparison
reportStr: char[1,] - report of comparsion
ISFIELDS - returns whether all fields whose names are given in the input
list are in the field list of given object or not
Usage: isPositive=isFields(self,fieldList)
Input:
regular:
self: CubeStruct [1,1]
fieldList: char or char cell [1,nFields]/[nFields,1] - input list of
given field names
Output:
isPositive: logical [1,1] - true if all gields whose
names are given in the input list are in the field
list of given object, false otherwise
isUniqueNames: logical[1,1] - true if the specified names contain
unique field values
isThereVec: logical[1,nFields] - each element indicate whether the
corresponding field is present in the cube
TODO allow for varargins
ISMEMBERALONGDIM - performs ismember operation of CubeStruct data slices
along the specified dimension
Input:
regular:
self: ARelation [1,1] - class object
other: ARelation [1,1] - other class object
dim: double[1,1] - dimension number for ismember operation
properties:
keyFieldNameList/fieldNameList: char or char cell [1,nKeyFields] -
list of fields to which ismember is applied; by default all
fields of first (self) object are used
Output:
regular:
isThere: logical [nSlices,1] - determines for each data slice of the
first (self) object whether combination of values for key fields
is in the second (other) object or not
indTheres: double [nSlices,1] - zero if the corresponding coordinate
of isThere is false, otherwise the highest index of the
corresponding data slice in the second (other) object
ISMEMBER - performs ismember operation for tuples of two relations by key
fields given by special list
Usage: isTuple=isMemberTuples(self,otherRel,keyFieldNameList) or
[isTuple indTuples]=isMemberTuples(self,otherRel,keyFieldNameList)
Input:
regular:
self: ARelation [1,1] - class object
other: ARelation [1,1] - other class object
optional:
keyFieldNameList: char or char cell [1,nKeyFields] - list of fields
to which ismember is applied; by default all fields of first
(self) object are used
Output:
regular:
isTuple: logical [nTuples,1] - determines for each tuple of first
(self) object whether combination of values for key fields is in
the second (other) relation or not
indTuples: double [nTuples,1] - zero if the corresponding coordinate
of isTuple is false, otherwise the highest index of the
corresponding tuple in the second (other) relation
ISUNIQUEKEY - checks if a specified set of fields forms a unique key
Usage: isPositive=self.isUniqueKey(fieldNameList)
Input:
regular:
self: ARelation [1,1] - class object
fieldNameList: cell[1,nFields] - list of field names for a unique
key candidate
Output:
isPositive: logical[1,1] - true means that a specified set of fields is
a unique key
ISEQUAL - compares current relation object with other relation object and
returns true if they are equal, otherwise it returns false
Usage: isEq=isEqual(self,otherObj)
Input:
regular:
self: ARelation [1,1] - current relation object
otherObj: ARelation [1,1] - other relation object
properties:
checkFieldOrder/isFieldOrderCheck: logical [1,1] - if true, then fields
in compared relations must be in the same order, otherwise the
order is not important (false by default)
checkTupleOrder: logical[1,1] - if true, then the tuples in the
compared relations are expected to be in the same order,
otherwise the order is not important (false by default)
maxTolerance: double [1,1] - maximum allowed tolerance
compareMetaDataBackwardRef: logical[1,1] if true, the CubeStruct's
referenced from the meta data objects are also compared
maxRelativeTolerance: double [1,1] - maximum allowed
relative tolerance
Output:
isEq: logical[1,1] - result of comparison
reportStr: char[1,] - report of comparsion
REMOVEDUPLICATETUPLES - removes all duplicate tuples from the relation
Usage: [indForwardVec,indBackwardVec]=...
removeDuplicateTuples(self,varargin)
Input:
regular:
self: ARelation [1,1] - class object
properties:
replaceNull: logical[1,1] if true, null values are replaced with
certain default values for all fields uniformly across all
relation tuples
default value is false
Output:
optional:
indForwardVec: double[nUniqueSlices,1] - indices of unique tuples in
the original relation
indBackwardVec: double[nSlices,1] - indices that map the unique
tuples back to the original tuples
REMOVETUPLES - removes tuples with given indices from given relation
Usage: self.removeTuples(subIndVec)
Input:
regular:
self: ARelation [1,1] - class object
subIndVec: double [nSubTuples,1]/logical[nTuples,1] - array of
indices for tuples that are selected to be removed
REORDERDATA - reorders cells of CubeStruct object along the specified
dimensions according to the specified index vectors
Input:
regular:
self: CubeStruct [1,1] - the object
subIndCVec: numeric[1,]/cell[1,nDims] of double [nSubElem_i,1]
for i=1,...,nDims array of indices of field value slices that
are selected to be returned;
if not given (default), no indexation is performed
optional:
dimVec: numeric[1,nDims] - vector of dimension numbers
corresponding to subIndCVec
SAVEOBJ- transforms given CubeStruct object into structure containing
internal representation of object properties
Input:
regular:
self: CubeStruct [nDim1,...,nDim2]
Output:
regular:
SObjectData: struct [n1,...,n_k] - structure containing an internal
representation of the specified object
SETDATA - sets values of all cells for all fields
Input:
regular:
self: CubeStruct[1,1]
optional:
SData: struct [1,1] - structure with values of all cells for
all fields
SIsNull: struct [1,1] - structure of fields with is-null
information for the field content, it can be logical for
plain real numbers of cell of logicals for cell strs or
cell of cell of str for more complex types
SIsValueNull: struct [1,1] - structure with logicals
determining whether value corresponding to each field
and field cell is null or not
properties:
fieldNameList: cell[1,] of char[1,] - list of fields for which data
should be generated, if not specified, all fields from the
relation are taken
isConsistencyCheckedVec: logical [1,1]/[1,2]/[1,3] -
the first element defines if a consistency between the value
elements (data, isNull and isValueNull) is checked;
the second element (if specified) defines if
value's type is checked.
the third element defines if consistency between of sizes
between different fields is checked
If isConsistencyCheckedVec
if scalar, it is automatically replicated to form a
3-element vector
if the third element is not specified it is assumed
to be true
transactionSafe: logical[1,1], if true, the operation is performed
in a transaction-safe manner
checkStruct: logical[1,nStruct] - an array of indicators which when
all true force checking of structure content (including presence
of required fields). The first element correspod to SData, the
second and the third (if specified) to SIsNull and SIsValueNull
correspondingly
structNameList: char[1,]/cell[1,], name of data structure/list of
data structure names to which the function is to
be applied, can be composed from the following values
SData - data itself
SIsNull - contains is-null indicator information for data
values
SIsValueNull - contains is-null indicators for CubeStruct cells
(not for cell values)
structNameList={'SData'} by default
fieldMetaData: smartdb.cubes.CubeStructFieldInfo[1,] - field meta
data array which is used for data validity checking and for
replacing the existing meta-data
mdFieldNameList: cell[1,] of char - list of names of fields for
which meta data is specified
dataChangeIsComplete: logical[1,1] - indicates whether a change
performed by the function is complete
Note: call of setData with an empty list of arguments clears
the data
SETFIELDINTERNAL - sets values of all cells for given field
Usage: setFieldInternal(self,fieldName,value)
Input:
regular:
self: CubeStruct [1,1]
fieldName: char - name of field
value: array [] of some type - field values
optional:
isNull: logical/cell[]
isValueNull: logical[]
properties:
structNameList: list of internal structures to return (by default it
is {SData, SIsNull, SIsValueNull}
inferIsNull: logical[1,2] - the first (second) element = false
means that IsNull (IsValueNull) indicator for a field in question
is kept intact (default = [true,true])
Note: if structNameList contains 'SIsValueNull' entry,
inferIsValueNull parameter is overwritten by false
SORTBY - sorts all tuples of given relation with respect to some of its
fields
Usage: sortBy(self,sortFieldNameList,varargin)
input:
regular:
self: ARelation [1,1] - class object
sortFieldNameList: char or char cell [1,nFields] - list of field
names with respect to which tuples are sorted
properties:
direction: char or char cell [1,nFields] - direction of sorting for
all fields (if one value is given) or for each field separately;
each value may be 'asc' or 'desc'
SORTBYALONGDIM - sorts data of given CubeStruct object along the
specified dimension using the specified fields
Usage: sortByInternal(self,sortFieldNameList,varargin)
input:
regular:
self: CubeStruct [1,1] - class object
sortFieldNameList: char or char cell [1,nFields] - list of field
names with respect to which field content is sorted
sortDim: numeric[1,1] - dimension number along which the sorting is
to be performed
properties:
direction: char or char cell [1,nFields] - direction of sorting for
all fields (if one value is given) or for each field separately;
each value may be 'asc' or 'desc'
TOARRAY - transforms values of all CubeStruct cells into a multi-
dimentional array
Usage: resCArray=toArray(self,varargin)
Input:
regular:
self: CubeStruct [1,1]
properties:
checkInputs: logical[1,1] - if false, the method skips checking the
input parameters for consistency
fieldNameList: cell[1,] - list of filed names to return
structNameList: cell[1,]/char[1,], data structure list
for which the data is to be taken from, can consist of the
following values
SData - data itself
SIsNull - contains is-null indicator information for data values
SIsValueNull - contains is-null indicators for CubeStruct cells
(not for cell values)
groupByColumns: logical[1,1], if true, each column is returned in a
separate cell
outputType: char[1,] - method of formign an output array, the
following methods are supported:
'uniformMat' - the field values are concatenated without any
type/size transformations. As a result, this method
will fail if the specified fields have different types
or/and sizes along any dimension apart from catDim
'uniformCell' - not-cell fields are converted to cells
element-wise but no size-transformations is performed.
This method will fail if the specified fields have
different sizes along any dimension apart from catDim
'notUniform' - this method doesn't make any assumptions about
size or type of the fields. Each field value is wrapped
into cell in a such way that a size of resulting cell
is minDimensionSizeVec for each field. Thus if for
instance is size of cube object is [2,3,4] and a field
size is [2,4,5,10,30] its value is splitted into 2*4*5
pieces with each piece of size [1,1,1,10,30] put it
its separate cell
'adaptiveCell' - functions similarly to 'nonUniform' except for
the cases when a field value size equals
minDimensionSizeVec exactly i.e. the field takes only
scalar values. In such cases no wrapping into cell is
performed which allows to get a more transparent
output.
catDim: double[1,1] - dimension number for
concatenating outputs when groupByColumns is false
replaceNull: logical[1,1], if true, null values from SData are
replaced by null replacement, = true by default
nullTopReplacement: - can be of any type and currently only applicable
when UniformOutput=false and of
the corresponding column type if UniformOutput=true.
Note!: this parameter is disregarded for any dataStructure different
from 'SData'.
Note!: the main difference between this parameter and the following
parameters is that nullTopReplacement can violate field type
constraints thus allowing to replace doubles with strings for
instance (for non-uniform output types only of course)
nullReplacements: cell[1,nReplacedFields] - list of null
replacements for each of the fields
nullReplacementFields: cell[1,nReplacedFields] - list of fields in
which the nulls are to be replaced with the specified values,
if not specified it is assumed that all fields are to be replaced
NOTE!: all fields not listed in this parameter are replaced with
the default values
Output:
Case1 (one output is requested and length(structNameList)==1):
resCMat: matrix/cell[] with values of all fields (or
fields selected by optional arguments) for all CubeStruct
data cells
Case2 (multiple outputs are requested and their number =
length(structNameList) each output is assigned resCMat for the
corresponding struct
Case3 (2 outputs is requested or length(structNameList)+1 outputs is
requested). In this case the last output argument is
isConvertedToCell: logical[nFields,nStructs] - matrix with true
values on the positions which correspond to fields converted to
cells
TOCELL - transforms values of all fields for all tuples into two
dimensional cell array
Usage: resCMat=toCell(self,varargin)
input:
regular:
self: ARelation [1,1] - class object
optional:
fieldName1: char - name of first field
...
fieldNameN: char - name of N-th field
output:
resCMat: cell [nTuples,nFields(N)] - cell with values of all fields (or
fields selected by optional arguments) for all tuples
FIXME - order fields in setData method
TOCELLISNULL - transforms is-null indicators of all fields for all tuples
into two dimensional cell array
Usage: resCMat=toCell(self,varargin)
input:
regular:
self: ARelation [1,1] - class object
optional:
fieldName1: char - name of first field
...
fieldNameN: char - name of N-th field
output:
resCMat: cell [nTuples,nFields(N)] - cell with values of all fields (or
fields selected by optional arguments) for all tuples
FIXME - order fields in setData method
TODISPCELL - transforms values of all fields into their character
representation
Usage: resCMat=toDispCell(self)
Input:
regular:
self: ARelation [1,1] - class object
properties:
nullTopReplacement: any[1,1] - value used to replace null values
fieldNameList: cell[1,] of char[1,] - field name list
Output:
dataCell: cell[nRows,nCols] of char[1,] - cell array containing the
character representation of field values
TOMAT - transforms values of all fields for all tuples into two
dimensional array
Usage: resCMat=toMat(self,varargin)
input:
regular:
self: ARelation [1,1] - class object
optional:
fieldNameList: cell[1,] - list of filed names to return
uniformOutput: logical[1,1], true - cell is returned, false - the
functions tries to return a result as a matrix
groupByColumns: logical[1,1], if true, each column is returned in a
separate cell
structNameList/dataStructure: char[1,], data structure for which the
data is to be taken from, can have one of the following values
SData - data itself
SIsNull - contains is-null indicator information for data values
SIsValueNull - contains is-null indicators for relation cells (not
for cell values
replaceNull: logical[1,1], if true, null values from SData are
replaced by null replacement, = true by default
nullTopReplacement: - can be of any type and currently only applicable
when UniformOutput=false and of
the corresponding column type if UniformOutput=true.
Note!: this parameter is disregarded for any dataStructure different
from 'SData'.
Note!: the main difference between this parameter and the following
parameters is that nullTopReplacement can violate field type
constraints thus allowing to replace doubles with strings for
instance (for non-uniform output types only of course)
nullReplacements: cell[1,nReplacedFields] - list of null
replacements for each of the fields
nullReplacementFields: cell[1,nReplacedFields] - list of fields in
which the nulls are to be replaced with the specified values,
if not specified it is assumed that all fields are to be replaced
NOTE!: all fields not listed in this parameter are replaced with
the default values
output:
resCMat: [nTuples,nFields(N)] - matrix/cell with values of all fields
(or fields selected by optional arguments) for all tuples
TOSTRUCT - transforms given CubeStruct object into structure
Input:
regular:
self: CubeStruct [nDim1,...,nDim2]
Output:
regular:
SObjectData: struct [n1,...,n_k] - structure containing an internal
representation of the specified object
UNIONWITH - adds tuples of the input relation to the set of tuples of the
original relation
Usage: self.unionWith(inpRel)
Input:
regular:
self: ARelation [1,1] - class object
inpRel1: ARelation [1,1] - object to get the additional tuples from
...
inpRelN: ARelation [1,1] - object to get the additional tuples from
properties:
checkType: logical[1,1] - if true, union is only performed when the
types of relations is the same. Default value is false
checkStruct: logical[1,nStruct] - an array of indicators which when
true force checking of structure content (including presence
of all required fields). The first element correspod to SData,
the second and the third (if specified) to SIsNull and
SIsValueNull correspondingly
checkConsistency: logical [1,1]/[1,2] - the
first element defines if a consistency between the value
elements (data, isNull and isValueNull) is checked;
the second element (if specified) defines if
value's type is checked. If isConsistencyChecked
is scalar, it is automatically replicated to form a
two-element vector.
Note: default value is true
UNIONWITHALONGDIM - adds data from the input CubeStructs
Usage: self.unionWithAlongDim(unionDim,inpCube)
Input:
regular:
self:
inpCube1: CubeStruct [1,1] - object to get the additional data from
...
inpCubeN: CubeStruct [1,1] - object to get the additional data from
properties:
checkType: logical[1,1] - if true, union is only performed when the
types of relations is the same. Default value is false
checkStruct: logical[1,nStruct] - an array of indicators which when
true force checking of structure content (including presence of
all required fields). The first element correspod to SData, the
second and the third (if specified) to SIsNull and SIsValueNull
correspondingly
checkConsistency: logical [1,1]/[1,2] - the
first element defines if a consistency between the value
elements (data, isNull and isValueNull) is checked;
the second element (if specified) defines if
value's type is checked. If isConsistencyChecked
is scalar, it is automatically replicated to form a
two-element vector.
Note: default value is true
WRITETOCSV - writes a content of relation into Excel spreadsheet file
Input:
regular:
self:
filePath: char[1,] - file path
Output:
none
WRITETOXLS - writes a content of relation into Excel spreadsheet file
Input:
regular:
self:
filePath: char[1,] - file path
Output:
fileName: char[1,] - resulting file name, may not match with filePath
when Excel is not available and csv format is used instead
A class which allows to work with ellipsoid tube objects.
Fields:
QArray: cell[1,1] of double[nDims,nDims,nTimePoints] -
a 3-dimentional matrix in which each of nTimePoints slices is a
double[nDims,nDims] ellipsoid matrix at nTimePoint point of time.
Here nTimePoints is number of elements in timeVec.
aMat: cell[1,nTimePoints] of double[nDims,1] - a 2-dimentional matrix
in which each of nTimePoints columns is a
double[nDims, 1] ellipsoid center. Each center is specified for
nTimePoint point of time
scaleFactor: double[1, 1] - scale for the created ellipsoid tube
MArray: cell[1,1] of double[nDims,nDims,nTimePoints] -
a 3-dimentional matrix in which each of nTimePoints slices is
a double[nDims,nDims] regularization matrix at nTimePoint point
of time.
dim: double[1, 1] - the dimension of the space in which the touching
curves are defined
sTime: double[1, 1] - specific point of time which is best suited to
describe good direction
approxSchemaName: cell[1, 1] of char[1,] - name of the
approximation schema
approxSchemaDescr: cell[1, 1] of char[1,] - description of the
approximation schema
approxType: gras.ellapx.enums.EApproxType[1,1] - type of approximation
(External, Internal, NotDefined)
timeVec: double[1, nTimePoints] - time vector
absTolerance: double[1, 1] - absolute tolerance
relTolerance: double[1, 1] - relative tolerance
indSTime: double[1, 1] - index of sTime point within timeVec
ltGoodDirMat: cell[1, nTimePoints] of double[nDims, 1] - matrix of
good direction vectors at any point of time from timeVec
lsGoodDirVec: cell[1, 1] of double[nDims, 1] - good direction vector
at sTime point of time
ltGoodDirNormVec: cell[1, 1] of double[1, nTimePoints] - norm of good
direction vector at any point of time from timeVec
lsGoodDirNorm: double[1, 1] - norm of good direction vector at
sTime point of time
xTouchCurveMat: cell[1, nTimePoints] of double[nDims, 1] - touch
point curve for good direction matrix
xTouchOpCurveMat: cell[1, nTimePoints] of double[nDims, 1] - touch
point curve oposite to the xTouchCurveMat touch point curve
xsTouchVec: cell[1, 1] of double[nDims, 1] - touch point at sTime
point of time
xsTouchOpVec: cell[1, 1] of double[nDims, 1] - a point opposite to
the xsTouchVec touch point
isLsTouch: logical[1, 1] - a logical variable which indicates whether
a touch takes place along good direction at sTime point of time
isLtTouchVec: cell[1, 1] of logical[nTimePoints, 1] - a logical
vector which indicates whether a touch takes place along good
direction at any point of time from timeVec
See the description of the following methods in smartdb.relations.ATypifiedStaticRelation for smartdb.relations.ATypifiedStaticRelation:
CAT - concatenates data from relation objects.
Input:
regular:
self.
newEllTubeRel: smartdb.relation.StaticRelation[1, 1]/
smartdb.relation.DynamicRelation[1, 1] - relation object
properties:
isReplacedByNew: logical[1,1] - if true, sTime and
values of properties corresponding to sTime are taken
from newEllTubeRel. Common times in self and
newEllTubeRel are allowed, however the values for
those times are taken either from self or from
newEllTubeRel depending on value of isReplacedByNew
property
isCommonValuesChecked: logical[1,1] - if true, values
at common times (if such are found) are checked for
strong equality (with zero precision). If not equal
- an exception is thrown. True by default.
commonTimeAbsTol: double[1,1] - absolute tolerance used
for comparing values at common times, =0 by default
commonTimeRelTol: double[1,1] - relative tolerance used
for comparing values at common times, =0 by default
Output:
catEllTubeRel:smartdb.relation.StaticRelation[1, 1]/
smartdb.relation.DynamicRelation[1, 1] - relation object
resulting from CAT operation
CUT - extracts the piece of the ellipsoid tube object from given
start point of time to given end point of time.
Input:
regular:
self.
cutTimeVec: double[1, 2] / double[1, 1] - time interval to cut
Output:
cutEllTubeRel: gras.ellapx.smartdb.rels.EllTube[1, 1] -
ellipsoid tube which is created from the original one by
cutting it from given start point of time to given end
point of time
FROMELLARRAY - creates ellipsoid tube object using an
array of ellipsoids.
Input:
regular:
qEllArray: double[nDims,nDims,nTimePoints] - array of
ellipsoids. Each element from double[nDims,nDims,nTimePoints]
array specifies double[nDims,nDims] ellipsoid at nTimePoint
point of time. Here nTimePoints is number of elements
in timeVec.
timeVec: cell[1,1] of double[1,nTimePoints] - time vector
ltGoodDirArray: cell[nEllTubes,1] of double[nDim, nTimePoints] -
cell of nEllTubes arrays of nTimePoints good direction
vectors at any point of time from timeVec
sTime: double[1,1] - specific point of time from timeVec
which is best suited to describe good direction
approxType: gras.ellapx.enums.EApproxType[1,1] - type
of approximation (External, Internal, NotDefined).
approxSchemaName: char[1,] - name of the approximation schema
approxSchemaDescr: char[1,] - description of the
approximation schema. It is possible
absTol:double[1, 1] - absolute tolerance
relTol:double[1, 1] - relative tolerance
Output:
ellTubeRel: gras.ellapx.smartdb.rels.EllTube[1, 1] - constructed
ellipsoid tube object
FROMELLMARRAY - creates ellipsoid tube object using an
array of ellipsoids and an array of regularisation matrices.
Input:
regular:
qEllArray: double[nDims,nDims,nTimePoints] - array of
ellipsoids. Each element from double[nDims,nDims,nTimePoints]
array specifies double[nDims,nDims] ellipsoid at nTimePoint
point of time. Here nTimePoints is number of elements
in timeVec.
ellMArr: double[nDims,nDims,nTimePoints] - an array of nTimePoints
regularization matrices of double[nDims,nDims] type.
Each element from double[nDims,nDims,nTimePoints] array
specifies double[nDim,nDim] regularization matrix at
nTimePoint point of time.
timeVec: cell[1,1] of double[1,nTimePoints] - time vector
ltGoodDirArray: cell[nEllTubes,1] of double[nDim, nTimePoints] -
cell of nEllTubes arrays of nTimePoints good direction
vectors at any point of time from timeVec
sTime: double[1,1] - specific point of time from timeVec
which is best suited to describe good direction
approxType: gras.ellapx.enums.EApproxType[1,1] - type
of approximation (External, Internal, NotDefined).
approxSchemaName: char[1,] - name of the approximation schema
approxSchemaDescr: char[1,] - description of the
approximation schema. It is possible
absTol:double[1, 1] - absolute tolerance
relTol:double[1, 1] - relative tolerance
Output:
ellTubeRel: gras.ellapx.smartdb.rels.EllTube[1, 1] - constructed
ellipsoid tube object
FROMQARRAYS creates nEllTubes ellipsoid tube objects using an
array of ellipsoid matrices and an array of ellipsoid centers
specified at any point of time from timeVec.
Input:
regular:
QArrayList: cell[nEllTubes,1] of double[nDims,nDims,nTimePoints] -
an array of nEllTubes 3-dimentional matrices in which
each of nTimePoints slices is a double[nDims,nDims]
ellipsoid matrix at nTimePoint point of time. Here
nTimePoints is number of elements in timeVec.
aMat: double[nDims, nTimePoints] - a 2-dimentional matrix
in which each of nTimePoints columns is a
double[nDims, 1] ellipsoid center. Each center is specified
for nTimePoint point of time
timeVec: cell[1,1] of double[1,nTimePoints] - time vector
ltGoodDirArray: cell[nEllTubes,1] of double[nDim, nTimePoints] -
cell of nEllTubes arrays of nTimePoints good direction
vectors at any point of time from timeVec
sTime: double[1,1] - specific point of time from timeVec
which is best suited to describe good direction
approxType: gras.ellapx.enums.EApproxType[1,1] /
/ gras.ellapx.enums.EApproxType[1,nEllTubes] - type
of approximation (External, Internal, NotDefined).
It is possible either to specify one type of
approximation for all of nEllTubes ellipsoid tubes,
or specify the type of approximation for each of the
nEllTubes ellipsoid tubes separately.
approxSchemaName: char[1,] / cell[1,nEllTubes] of char[1,] -
name of the approximation schema. It is possible either
to specify one name of the approximation schema for
all of nEllTubes ellipsoid tubes, or specify the name
of the approximation schema for each of the nEllTubes
ellipsoid tubes separately.
approxSchemaDescr: char[1,] / cell[1,nEllTubes] of char[1,] -
description of the approximation schema. It is possible
either to specify one description of the approximation
schema for all of nEllTubes ellipsoid tubes, or specify
the description of the approximation schema for each
of the nEllTubes ellipsoid tubes separately.
absTol:double[1, 1] - absolute tolerance
relTol:double[1, 1] - relative tolerance
Output:
ellTubeRel: gras.ellapx.smartdb.rels.EllTube[1, 1] - constructed
ellipsoid tube object
FROMQMARRAYS creates nEllTubes ellipsoid tube objects using an
array of ellipsoid matrices, an array of ellipsoid centers
and an array of regularization marices specified at any point
of time from timeVec.
Input:
regular:
QArrayList: cell[nEllTubes,1] of double[nDims,nDims,nTimePoints] -
an array of nEllTubes 3-dimentional matrices in which
each of nTimePoints slices is a double[nDims,nDims]
ellipsoid matrix at nTimePoint point of time. Here
nTimePoints is number of elements in timeVec.
MArrayList: cell[nEllTubes,1] of double[nDims,nDims,nTimePoints] -
an array of nEllTubes 3-dimentional matrices in which
each of nTimePoints slices is a double[nDims,nDims]
regularization matrix at nTimePoint point of time.
aMat: double[nDims, nTimePoints] - a 2-dimentional matrix
in which each of nTimePoints columns is a
double[nDims, 1] ellipsoid center. Each center is specified
for nTimePoint point of time
timeVec: cell[1,1] of double[1,nTimePoints] - time vector
ltGoodDirArray: cell[nEllTubes,1] of double[nDim, nTimePoints] -
cell of nEllTubes arrays of nTimePoints good direction
vectors at any point of time from timeVec
sTime: double[1,1] - specific point of time from timeVec
which is best suited to describe good direction
approxType: gras.ellapx.enums.EApproxType[1,1] /
/ gras.ellapx.enums.EApproxType[1,nEllTubes] - type
of approximation (External, Internal, NotDefined).
It is possible either to specify one type of
approximation for all of nEllTubes ellipsoid tubes,
or specify the type of approximation for each of the
nEllTubes ellipsoid tubes separately.
approxSchemaName: char[1,] / cell[1,nEllTubes] of char[1,] -
name of the approximation schema. It is possible either
to specify one name of the approximation schema for
all of nEllTubes ellipsoid tubes, or specify the name
of the approximation schema for each of the nEllTubes
ellipsoid tubes separately.
approxSchemaDescr: char[1,] / cell[1,nEllTubes] of char[1,] -
description of the approximation schema. It is possible
either to specify one description of the approximation
schema for all of nEllTubes ellipsoid tubes, or specify
the description of the approximation schema for each
of the nEllTubes ellipsoid tubes separately.
absTol:double[1, 1] - absolute tolerance
relTol:double[1, 1] - relative tolerance
Output:
ellTubeRel: gras.ellapx.smartdb.rels.EllTube[1, 1] - constructed
ellipsoid tube object
FROMQMSCALEDARRAYS creates nEllTubes ellipsoid tube objects using an
array of ellipsoid matrices, an array of ellipsoid centers,
an array of regularization marices specified at any point
of time from timeVec and a vector of scale factors
specified for every created ellipsoid tube
Input:
regular:
QArrayList: cell[nEllTubes,1] of double[nDims,nDims,nTimePoints] -
an array of nEllTubes 3-dimentional matrices in which
each of nTimePoints slices is a double[nDims,nDims]
ellipsoid matrix at nTimePoint point of time. Here
nTimePoints is number of elements in timeVec.
MArrayList: cell[nEllTubes,1] of double[nDims,nDims,nTimePoints] -
an array of nEllTubes 3-dimentional matrices in which
each of nTimePoints slices is a double[nDims,nDims]
regularization matrix at nTimePoint point of time.
aMat: double[nDims, nTimePoints] - a 2-dimentional matrix
in which each of nTimePoints columns is a
double[nDims, 1] ellipsoid center. Each center is specified
for nTimePoint point of time
timeVec: cell[1,1] of double[1,nTimePoints] - time vector
ltGoodDirArray: cell[nEllTubes,1] of double[nDim, nTimePoints] -
cell of nEllTubes arrays of nTimePoints good direction
vectors at any point of time from timeVec
sTime: double[1,1] - specific point of time from timeVec
which is best suited to describe good direction
approxType: gras.ellapx.enums.EApproxType[1,1] /
/ gras.ellapx.enums.EApproxType[1,nEllTubes] - type
of approximation (External, Internal, NotDefined).
It is possible either to specify one type of
approximation for all of nEllTubes ellipsoid tubes,
or specify the type of approximation for each of the
nEllTubes ellipsoid tubes separately.
approxSchemaName: char[1,] / cell[1,nEllTubes] of char[1,] -
name of the approximation schema. It is possible either
to specify one name of the approximation schema for
all of nEllTubes ellipsoid tubes, or specify the name
of the approximation schema for each of the nEllTubes
ellipsoid tubes separately.
approxSchemaDescr: char[1,] / cell[1,nEllTubes] of char[1,] -
description of the approximation schema. It is possible
either to specify one description of the approximation
schema for all of nEllTubes ellipsoid tubes, or specify
the description of the approximation schema for each
of the nEllTubes ellipsoid tubes separately.
absTol:double[1, 1] - absolute tolerance
relTol:double[1, 1] - relative tolerance
scaleFactor:double[1,nTubes] - vector of scale factors
Output:
ellTubeRel: gras.ellapx.smartdb.rels.EllTube[1, 1] - constructed
ellipsoid tube object
GETDATA - gets data from ATypifiedAdjustedRel object
Input:
regular:
self.
varargin:
Output:
optional:
GETELLARRAY - returns array of ellipsoids according to
approxType
Input:
regular:
self.
approxType: cell[nEllTubes, 1] of char[1,] - type of
approximation(internal/external)
Output:
apprEllMat: ellipsoid[nTimePoints, nEllTubes] - an array
of all the ellipsoids from all the ellipsoid tubes that
are stored in self object
timeVec: cell[1,1] of double[1,nTimePoints] - time vector
GETJOINWITH - returns a result of INNER join of given relation with
another relation by the specified key fields
LIMITATION: key fields by which the join is peformed are required to form
a unique key in the given relation
Input:
regular:
self:
otherRel: smartdb.relations.ARelation[1,1]
keyFieldNameList: char[1,]/cell[1,nFields] of char[1,]
properties:
joinType: char[1,] - type of join, can be
'inner' (DEFAULT)
'leftOuter'
Output:
resRel: smartdb.relations.ARelation[1,1] - join result
GETNOCATORCUTFIELDSLIST - returns a list of fields of
EllTubeBasic object, which are not to be
concatenated or cut.
Input:
regular:
self.
Output:
fieldsList: cell[nFields, 1] of char[1, ] - list of fields
of EllTubeBasic object, which are not to be
concatenated or cut
INTERP - interpolates ellipsoidal tube on a new time vector
Input:
regular:
self.
timeVec: double[1, nTimePoints] - sorted time vector to
interpolate on. Must begin with self.timeVec[1] and
end with self.timeVec[end]
Output:
interpEllTube: gras.ellapx.smartdb.rels.EllTubeBasic[1, 1] -
interpolated ellipsoidal tube
ISEQUAL - compares current relation object with other relation
object and returns true if they are equal, otherwise it returns
false.
Input:
regular:
self.
otherObj: ARelation [1,1] - other relation object
properties:
checkFieldOrder/isFieldOrderCheck: logical [1,1] - if true,
then fields in compared relations must be in the same
order, otherwise the order is not important (false by
default)
checkTupleOrder: logical[1,1] - if true, then the tuples
in the compared relations are expected to be in the same
order, otherwise the order is not important (false by
default)
maxTolerance: double [1,1] - maximum allowed tolerance
maxRelativeTolerance: double [1,1] - maximum allowed relative
tolerance
compareMetaDataBackwardRef: logical[1,1] if true, the CubeStruct's
referenced from the meta data objects are also compared
notComparedFieldList: cell[1,nFields] of char[1,] - list
of fields that are not to be compared
areTimeBoundsCompared: logical[1,1] - if false,
ellipsoidal tubes are compared on intersection of
definition domains
Output:
isOk: logical[1, 1] - logical vector elements of
which take OK value if the fields in self and otherRel
are equal and otherwise it takes FALSE value
reportStr: char[1, ] - a report string which contains more
detailed information about inequal fields in self and
otherRel objects
PLOT - displays ellipsoidal tubes using the specified RelationDataPlotter
Input:
regular:
self.
optional:
plObj: smartdb.disp.RelationDataPlotter[1,1] - plotter
object used for displaying ellipsoidal tubes
Output:
plObj: smartdb.disp.RelationDataPlotter[1,1] - plotter
object used for displaying ellipsoidal tubes
PROJECT - projects ellipsoid tube onto subspace
Input:
regular:
self.
projType: gras.ellapx.enums.EProjType[1, 1] - type of
projection. It can be Static or DynamicAlongGoodCurve.
projMatList: double[nDims, nDims] - subspace defined by
its basis vectors on which ellipsoid tube has to be
projected
fGetProjMat: cell_fun[1, ] - function that is used to
get the projection.
Output:
ellTubeProjRel: gras.ellapx.smartdb.rels.EllTubeProj[1, 1] -
ellipsoid tube projection
indProj2OrigVec: double[1, ] - vector of indices
PROJECTSTATIC - computes a static projection of the relation
object onto static subspaces specified by static matrices
Input:
regular:
self.
projMatList: double[nSpDims,nDims]/cell[1,nProjs]
of double[nSpDims,nDims] - list of not necessarily orthogonal
projection matrices
Output:
ellTubeProjRel: smartdb.relation.StaticRelation[1, 1]/
smartdb.relation.DynamicRelation[1, 1]- projected relation
indProj2OrigVec:cell[nDims, 1] - index of the line number from
which is obtained the projection
PROJECTTOORTHS - projects ellipsoid tube onto subspace defined
by vectors of standart basis with indices specified in
indVec.
Input:
regular:
self.
indVec: double[1, nProjDims] - indices specifying a subset
of standart basis
optional:
projType: gras.ellapx.enums.EProjType[1, 1] - type of
projection. Default option is Static.
Output:
ellTubeProjRel: gras.ellapx.smartdb.rels.EllTubeProj[1, 1] -
ellipsoid tube projection
Example:
ellTubeProjRel = ellTubeRel.projectToOrths([1,2])
projType = gras.ellapx.enums.EProjType.DynamicAlongGoodCurve
ellTubeProjRel = ellTubeRel.projectToOrths([3,4,5], projType)
SCALE - calculates new value of scaleFactor for fields from
fieldNameList using fCalcFactor function
Input:
regular:
self.
fCalcFactor: function_handle[1, 1] - function which calculates
scaleFactor for fields in fieldNameList
fieldNameList: char[1, ]/cell[1,nFields] of char[1, ] -
a list of field or nFields fields for which scale factor
will be calculated
Output:
none.
SORTDETERMENISTICALLY - sorts fields of ATypifiedAdjustedRel
object using specified maximal tolerance
Input:
regular:
self.
maxTolerance: double[1, 1] - maximal tolerance that is
used while sorting elements of self object.
Output:
none.
THINOUTTUPLES - thins ellipsoid tube object using vector of
indices specified by the user. The function returns new
ellipsoid tube object containing only ellipsoids from the
original ellipsoid tube with indices specified in indVec.
Input:
regular:
self.
indVec: double[nIndices, 1] - indices of ellipsoids which
are to be included in new ellipsoid tube object
Output:
thinnedEllTubeRel: gras.ellapx.smartdb.rels.EllTubeBasic[1, 1] -
new ellipsoid tube object containing only ellipsoids from
self EllTube object with indices specified in indVec
A class which allows to work with projections of ellipsoid tube objects.
Fields:
QArray: cell[1,1] of double[nDims,nDims,nTimePoints] -
a 3-dimentional matrix in which each of nTimePoints slices is a
double[nDims,nDims] projection of an ellipsoid matrix on specified
subspace at nTimePoint point of time. Here nTimePoints is number
of elements in timeVec.
aMat: cell[1,nTimePoints] of double[nDims,1] - a 2-dimentional matrix
in which each of nTimePoints columns is a projection of
an ellipsoid center. Each center is specified for
nTimePoint point of time
scaleFactor: double[1, 1] - scale for the created ellipsoid tube
MArray: cell[1,1] of double[nDims,nDims,nTimePoints] -
a 3-dimentional matrix in which each of nTimePoints slices is a
double[nDims,nDims] projection of a regularization matrix on specified
subspace at nTimePoint point of time.
dim: double[1, 1] - the dimension of the space on which the touching
curves are projected
sTime: double[1, 1] - specific point of time which is best suited to
describe good direction
approxSchemaName: cell[1, 1] of char[1,] - name of the
approximation schema
approxSchemaDescr: cell[1, 1] of char[1,] - description of the
approximation schema
approxType: gras.ellapx.enums.EApproxType[1,1] - type of approximation
(External, Internal, NotDefined)
timeVec: double[1, nTimePoints] - time vector
absTolerance: double[1, 1] - absolute tolerance
relTolerance: double[1, 1] - relative tolerance
indSTime: double[1, 1] - index of sTime point within timeVec
ltGoodDirMat: cell[1, nTimePoints] of double[nDims, 1] - matrix of
the projections of good direction vectors on the specified space
at any point of time from timeVec
lsGoodDirVec: cell[1, 1] of double[nDims, 1] - the projection of good
direction vector on the specified space at sTime point of time
ltGoodDirNormVec: cell[1, 1] of double[1, nTimePoints] - norm of the
projections of good direction vectors on the specified space at
any point of time from timeVec
lsGoodDirNorm: double[1, 1] - norm of the projection of good direction
vector on the specified space at sTime point of time
xTouchCurveMat: cell[1, nTimePoints] of double[nDims, 1] - the projection
of touch point curve on the specified space for good direction matrix
xTouchOpCurveMat: cell[1, nTimePoints] of double[nDims, 1] - the projection
of touch point curve oposite to the xTouchCurveMat touch point curve
xsTouchVec: cell[1, 1] of double[nDims, 1] - the projection of touch
point at sTime point of time
xsTouchOpVec: cell[1, 1] of double[nDims, 1] - the projection of a
point opposite to the xsTouchVec touch point
isLsTouch: logical[1, 1] - a logical variable which indicates whether
a touch takes place along good direction at sTime point of time
isLsTouchVec: cell[1, 1] of logical[nTimePoints, 1] - a logical
vector which indicates whether a touch takes place along good
direction at any point of time from timeVec
projSMat: cell[1, 1] of double[nDims, nDims] - projection matrix at
sTime point of time
projArray: cell[nTimePoints, 1] of double[nDims, nDims] - an array
of projection matrices at any point of time from timVec
projType: gras.ellapx.enums.EProjType[1, 1] - type of projection
(Static, DynamicAlongGoodCurve)
ltGoodDirNormOrigVec: cell[1, 1] of double[1, nTimePoints] - norm
of the original good direction vectors at any point of time from timeVec
lsGoodDirNormOrig: double[1, 1] - norm of the original good direction
vector at sTime point of time
ltGoodDirOrigMat: cell[1, nTimePoints] of double[nDims, 1] - matrix
of the original good direction vectors at any point of time from timeVec
lsGoodDirOrigVec: cell[1, 1] of double[nDims, 1] - the original good
direction vector at sTime point of time
ltGoodDirNormOrigProjVec: cell[1, 1] of double[1, nTimePoints] - norm
of the projection of the original good direction curve
ltGoodDirOrigProjMat: cell[1, 1] of double[nDims, nTimePoints] - the
projectition of the original good direction curve
See the description of the following methods in smartdb.relations.ATypifiedStaticRelation for smartdb.relations.ATypifiedStaticRelation:
CUT - extracts the piece of the ellipsoid tube object from given
start point of time to given end point of time.
Input:
regular:
self.
cutTimeVec: double[1, 2] / double[1, 1] - time interval to cut
Output:
cutEllTubeRel: gras.ellapx.smartdb.rels.EllTube[1, 1] -
ellipsoid tube which is created from the original one by
cutting it from given start point of time to given end
point of time
GETDATA - gets data from ATypifiedAdjustedRel object
Input:
regular:
self.
varargin:
Output:
optional:
GETELLARRAY - returns array of ellipsoids according to
approxType
Input:
regular:
self.
approxType: cell[nEllTubes, 1] of char[1,] - type of
approximation(internal/external)
Output:
apprEllMat: ellipsoid[nTimePoints, nEllTubes] - an array
of all the ellipsoids from all the ellipsoid tubes that
are stored in self object
timeVec: cell[1,1] of double[1,nTimePoints] - time vector
GETJOINWITH - returns a result of INNER join of given relation with
another relation by the specified key fields
LIMITATION: key fields by which the join is peformed are required to form
a unique key in the given relation
Input:
regular:
self:
otherRel: smartdb.relations.ARelation[1,1]
keyFieldNameList: char[1,]/cell[1,nFields] of char[1,]
properties:
joinType: char[1,] - type of join, can be
'inner' (DEFAULT)
'leftOuter'
Output:
resRel: smartdb.relations.ARelation[1,1] - join result
GETNOCATORCUTFIELDLIST - returns a list of fields of
EllTubeProjBasic object, which are not to be
concatenated or cut.
Input:
regular:
self.
Output:
fieldsList: cell[nFields, 1] of char[1, ] - list of fields
of EllTubeProjBasic object, which are not to be
concatenated or cut
GETREACHTUBENAMEPREFIX - returns the prefix of the reach tube
Input:
regular:
self.
Output:
namePrefix: char[1, ] - prefix of the reach tube
GETREGTUBENAMEPREFIX - returns the prefix of the regular tube
Input:
regular:
self.
Output:
namePrefix: char[1, ] - prefix of the regular tube
INTERP - interpolates ellipsoidal tube on a new time vector
Input:
regular:
self.
timeVec: double[1, nTimePoints] - sorted time vector to
interpolate on. Must begin with self.timeVec[1] and
end with self.timeVec[end]
Output:
interpEllTube: gras.ellapx.smartdb.rels.EllTubeBasic[1, 1] -
interpolated ellipsoidal tube
ISEQUAL - compares current relation object with other relation
object and returns true if they are equal, otherwise it returns
false.
Input:
regular:
self.
otherObj: ARelation [1,1] - other relation object
properties:
checkFieldOrder/isFieldOrderCheck: logical [1,1] - if true,
then fields in compared relations must be in the same
order, otherwise the order is not important (false by
default)
checkTupleOrder: logical[1,1] - if true, then the tuples
in the compared relations are expected to be in the same
order, otherwise the order is not important (false by
default)
maxTolerance: double [1,1] - maximum allowed tolerance
maxRelativeTolerance: double [1,1] - maximum allowed relative
tolerance
compareMetaDataBackwardRef: logical[1,1] if true, the CubeStruct's
referenced from the meta data objects are also compared
notComparedFieldList: cell[1,nFields] of char[1,] - list
of fields that are not to be compared
areTimeBoundsCompared: logical[1,1] - if false,
ellipsoidal tubes are compared on intersection of
definition domains
Output:
isOk: logical[1, 1] - logical vector elements of
which take OK value if the fields in self and otherRel
are equal and otherwise it takes FALSE value
reportStr: char[1, ] - a report string which contains more
detailed information about inequal fields in self and
otherRel objects
PLOT - displays ellipsoidal tubes using the specified
RelationDataPlotter
Input:
regular:
self:
optional:
plObj: smartdb.disp.RelationDataPlotter[1,1] - plotter
object used for displaying ellipsoidal tubes
properties:
fGetColor: function_handle[1, 1] -
function that specified colorVec for
ellipsoidal tubes
fGetAlpha: function_handle[1, 1] -
function that specified transparency
value for ellipsoidal tubes
fGetLineWidth: function_handle[1, 1] -
function that specified lineWidth for good curves
fGetFill: function_handle[1, 1] - this
property not used in this version
colorFieldList: cell[nColorFields, ] of char[1, ] -
list of parameters for color function
alphaFieldList: cell[nAlphaFields, ] of char[1, ] -
list of parameters for transparency function
lineWidthFieldList: cell[nLineWidthFields, ]
of char[1, ] - list of parameters for lineWidth
function
fillFieldList: cell[nIsFillFields, ] of char[1, ] -
list of parameters for fill function
plotSpecFieldList: cell[nPlotFields, ] of char[1, ] -
default list of parameters. If for any function in
properties not specified list of parameters,
this one will be used
Output:
plObj: smartdb.disp.RelationDataPlotter[1,1] - plotter
object used for displaying ellipsoidal tubes
PLOTEXT - plots external approximation of ellTube.
Input:
regular:
obj: EllTubeProj: EllTubeProj object
optional:
relDataPlotter:smartdb.disp.RelationDataPlotter[1,1] - relation data plotter object.
colorSpec: char[1,1] - color specification code, can be 'r','g',
etc (any code supported by built-in Matlab function).
properties:
fGetColor: function_handle[1, 1] -
function that specified colorVec for
ellipsoidal tubes
fGetAlpha: function_handle[1, 1] -
function that specified transparency
value for ellipsoidal tubes
fGetLineWidth: function_handle[1, 1] -
function that specified lineWidth for good curves
fGetFill: function_handle[1, 1] - this
property not used in this version
colorFieldList: cell[nColorFields, ] of char[1, ] -
list of parameters for color function
alphaFieldList: cell[nAlphaFields, ] of char[1, ] -
list of parameters for transparency function
lineWidthFieldList: cell[nLineWidthFields, ]
of char[1, ] - list of parameters for lineWidth
function
fillFieldList: cell[nIsFillFields, ] of char[1, ] -
list of parameters for fill function
plotSpecFieldList: cell[nPlotFields, ] of char[1, ] -
defaul list of parameters. If for any function in
properties not specified list of parameters,
this one will be used
'showDiscrete':logical[1,1] -
if true, approximation in 3D will be filled in every
time slice
'nSpacePartPoins': double[1,1] -
number of points in every time slice.
Output:
regular:
plObj: smartdb.disp.RelationDataPlotter[1,1] - returns
the relation data plotter object.
Usage:
obj.plotExt() - plots external approximation of ellTube.
obj.plotExt('Property',PropValue,...) - plots external approximation
of ellTube with setting
properties.
PLOTINT - plots internal approximation of ellTube.
Input:
regular:
obj: EllTubeProj: EllTubeProj object
optional:
relDataPlotter:smartdb.disp.RelationDataPlotter[1,1] -
relation data plotter object.
colorSpec: char[1,1] - color specification code, can be
'r','g', etc (any code supported by built-in Matlab function).
properties:
fGetColor: function_handle[1, 1] -
function that specified colorVec for
ellipsoidal tubes
fGetAlpha: function_handle[1, 1] -
function that specified transparency
value for ellipsoidal tubes
fGetLineWidth: function_handle[1, 1] -
function that specified lineWidth for good curves
fGetFill: function_handle[1, 1] - this
property not used in this version
colorFieldList: cell[nColorFields, ] of char[1, ] -
list of parameters for color function
alphaFieldList: cell[nAlphaFields, ] of char[1, ] -
list of parameters for transparency function
lineWidthFieldList: cell[nLineWidthFields, ]
of char[1, ] - list of parameters for lineWidth
function
fillFieldList: cell[nIsFillFields, ] of char[1, ] -
list of parameters for fill function
plotSpecFieldList: cell[nPlotFields, ] of char[1, ] -
defaul list of parameters. If for any function in
properties not specified list of parameters,
this one will be used
'showDiscrete':logical[1,1] -
if true, approximation in 3D will be filled in every
time slice
'nSpacePartPoins': double[1,1] -
number of points in every time slice.
Output:
regular:
plObj: smartdb.disp.RelationDataPlotter[1,1] - returns
the relation data plotter object.
Usage:
obj.plotInt() - plots internal approximation of ellTube.
obj.plotInt('Property',PropValue,...) - plots internal approximation
of ellTube with setting
properties.
PROJMAT2STR - transforms the specified projection matrix at
sTime point of time into a string.
Input:
projSTimeMat: double[nDims, nDims] - projection matrix at
sTime point of time
Output:
projStrName: char[1,] - the projection matrix at sTime point
of time written as a string
Help for gras.ellapx.smartdb.rels.EllTubeProj.projMat2str is inherited from superclass GRAS.ELLAPX.SMARTDB.RELS.ELLTUBETOUCHCURVEPROJBASIC
PROJMAT2STR - transforms the specified row of the projection
matrix at sTime point of time into a string.
Input:
projSTimeMat: double[nDims, nDims] - projection matrix at
sTime point of time
Output:
projStrName: char[1,] - the specified row of the projection
matrix at sTime point of time written as a string
Help for gras.ellapx.smartdb.rels.EllTubeProj.projRow2str is inherited from superclass GRAS.ELLAPX.SMARTDB.RELS.ELLTUBETOUCHCURVEPROJBASIC
SORTDETERMENISTICALLY - sorts fields of ATypifiedAdjustedRel
object using specified maximal tolerance
Input:
regular:
self.
maxTolerance: double[1, 1] - maximal tolerance that is
used while sorting elements of self object.
Output:
none.
THINOUTTUPLES - thins ellipsoid tube object using vector of
indices specified by the user. The function returns new
ellipsoid tube object containing only ellipsoids from the
original ellipsoid tube with indices specified in indVec.
Input:
regular:
self.
indVec: double[nIndices, 1] - indices of ellipsoids which
are to be included in new ellipsoid tube object
Output:
thinnedEllTubeRel: gras.ellapx.smartdb.rels.EllTubeBasic[1, 1] -
new ellipsoid tube object containing only ellipsoids from
self EllTube object with indices specified in indVec
A class which allows to work with unions of ellipsoid tube objects.
Fields:
QArray: cell[1,1] of double[nDims,nDims,nTimePoints] -
a 3-dimentional matrix in which each of nTimePoints slices is a
double[nDims,nDims] ellipsoid matrix at nTimePoint point of time.
Here nTimePoints is number of elements in timeVec.
aMat: cell[1,nTimePoints] of double[nDims,1] - a 2-dimentional matrix
in which each of nTimePoints columns is a
double[nDims, 1] ellipsoid center. Each center is specified for
nTimePoint point of time
scaleFactor: double[1, 1] - scale for the created ellipsoid tube
MArray: cell[1,1] of double[nDims,nDims,nTimePoints] -
a 3-dimentional matrix in which each of nTimePoints slices is
a double[nDims,nDims] regularization matrix at nTimePoint point
of time.
dim: double[1, 1] - the dimension of the space in which the touching
curves are defined
sTime: double[1, 1] - specific point of time which is best suited to
describe good direction
approxSchemaName: cell[1, 1] of char[1,] - name of the
approximation schema
approxSchemaDescr: cell[1, 1] of char[1,] - description of the
approximation schema
approxType: gras.ellapx.enums.EApproxType[1,1] - type of approximation
(External, Internal, NotDefined)
timeVec: double[1, nTimePoints] - time vector
calcPrecision: double[1, 1] - calculation precision
indSTime: double[1, 1] - index of sTime point within timeVec
ltGoodDirMat: cell[1, nTimePoints] of double[nDims, 1] - matrix of
good direction vectors at any point of time from timeVec
lsGoodDirVec: cell[1, 1] of double[nDims, 1] - good direction vector
at sTime point of time
ltGoodDirNormVec: cell[1, 1] of double[1, nTimePoints] - norm of good
direction vector at any point of time from timeVec
lsGoodDirNorm: double[1, 1] - norm of good direction vector at
sTime point of time
xTouchCurveMat: cell[1, nTimePoints] of double[nDims, 1] - touch
point curve for good direction matrix
xTouchOpCurveMat: cell[1, nTimePoints] of double[nDims, 1] - touch
point curve oposite to the xTouchCurveMat touch point curve
xsTouchVec: cell[1, 1] of double[nDims, 1] - touch point at sTime
point of time
xsTouchOpVec: cell[1, 1] of double[nDims, 1] - a point opposite to
the xsTouchVec touch point
isLsTouch: logical[1, 1] - a logical variable which indicates whether
a touch takes place along good direction at sTime point of time
isLtTouchVec: cell[1, 1] of logical[nTimePoints, 1] - a logical
vector which indicates whether a touch takes place along good
direction at any point of time from timeVec
ellUnionTimeDirection: gras.ellapx.enums.EEllUnionTimeDirection[1, 1] -
direction in time along which union is performed
timeTouchEndVec: cell [1, 1] of double[1, nTimePoints] - points of
time when touch is occured in good direction
timeTouchOpEndVec: cell [1, 1] of double[1, nTimePoints] - points of
time when touch is occured in direction opposite to good direction
isLsTouchOp: logical[1, 1] - a logical variable which indicates whether
a touch takes place along the direction opposite to the good direction
at sTime point of time
isLtTouchOpVec: cell [1, 1] of logical[nTimePoints, 1] - a logical
variable which indicates whether a touch takes place
along the direction opposite to the good direction at any point
of time from timeVec
See the description of the following methods in smartdb.relations.ATypifiedStaticRelation for smartdb.relations.ATypifiedStaticRelation:
CUT - extracts the piece of the ellipsoid tube object from given
start point of time to given end point of time.
Input:
regular:
self.
cutTimeVec: double[1, 2] / double[1, 1] - time interval to cut
Output:
cutEllTubeRel: gras.ellapx.smartdb.rels.EllTube[1, 1] -
ellipsoid tube which is created from the original one by
cutting it from given start point of time to given end
point of time
FROMELLTUBES - returns union of the ellipsoidal tubes on time
Input:
ellTubeRel: smartdb.relation.StaticRelation[1, 1]/
smartdb.relation.DynamicRelation[1, 1] - relation
object
Output:
ellUnionTubeRel: ellapx.smartdb.rel.EllUnionTube - union of the
ellipsoidal tubes
GETDATA - gets data from ATypifiedAdjustedRel object
Input:
regular:
self.
varargin:
Output:
optional:
GETELLARRAY - returns array of ellipsoids according to
approxType
Input:
regular:
self.
approxType: cell[nEllTubes, 1] of char[1,] - type of
approximation(internal/external)
Output:
apprEllMat: ellipsoid[nTimePoints, nEllTubes] - an array
of all the ellipsoids from all the ellipsoid tubes that
are stored in self object
timeVec: cell[1,1] of double[1,nTimePoints] - time vector
GETJOINWITH - returns a result of INNER join of given relation with
another relation by the specified key fields
LIMITATION: key fields by which the join is peformed are required to form
a unique key in the given relation
Input:
regular:
self:
otherRel: smartdb.relations.ARelation[1,1]
keyFieldNameList: char[1,]/cell[1,nFields] of char[1,]
properties:
joinType: char[1,] - type of join, can be
'inner' (DEFAULT)
'leftOuter'
Output:
resRel: smartdb.relations.ARelation[1,1] - join result
GETNOCATORCUTFIELDLIST - returns a list of fields of
EllUionTube object, which are not to be
concatenated or cut.
Input:
regular:
self.
Output:
fieldsList: cell[nFields, 1] of char[1, ] - list of fields
of EllUionTube object, which are not to be
concatenated or cut
INTERP - interpolates ellipsoidal tube on a new time vector
Input:
regular:
self.
timeVec: double[1, nTimePoints] - sorted time vector to
interpolate on. Must begin with self.timeVec[1] and
end with self.timeVec[end]
Output:
interpEllTube: gras.ellapx.smartdb.rels.EllTubeBasic[1, 1] -
interpolated ellipsoidal tube
ISEQUAL - compares current relation object with other relation
object and returns true if they are equal, otherwise it returns
false.
Input:
regular:
self.
otherObj: ARelation [1,1] - other relation object
properties:
checkFieldOrder/isFieldOrderCheck: logical [1,1] - if true,
then fields in compared relations must be in the same
order, otherwise the order is not important (false by
default)
checkTupleOrder: logical[1,1] - if true, then the tuples
in the compared relations are expected to be in the same
order, otherwise the order is not important (false by
default)
maxTolerance: double [1,1] - maximum allowed tolerance
maxRelativeTolerance: double [1,1] - maximum allowed relative
tolerance
compareMetaDataBackwardRef: logical[1,1] if true, the CubeStruct's
referenced from the meta data objects are also compared
notComparedFieldList: cell[1,nFields] of char[1,] - list
of fields that are not to be compared
areTimeBoundsCompared: logical[1,1] - if false,
ellipsoidal tubes are compared on intersection of
definition domains
Output:
isOk: logical[1, 1] - logical vector elements of
which take OK value if the fields in self and otherRel
are equal and otherwise it takes FALSE value
reportStr: char[1, ] - a report string which contains more
detailed information about inequal fields in self and
otherRel objects
PROJECT - projects ellipsoid tube union onto subspace
Input:
regular:
self.
projType: gras.ellapx.enums.EProjType[1, 1] - type of
projection. It can only be Static for ellipsoid tube
unions.
projMatList: double[nDims, nDims] - subspace defined by
its basis vectors on which ellipsoid tube has to be
projected
fGetProjMat: cell_fun[1, ] - function that is used to
get the projection.
Output:
ellTubeProjRel: gras.ellapx.smartdb.rels.EllTubeProj[1, 1] -
ellipsoid tube projection
indProj2OrigVec: double[1, ] - vector of indices
PROJECTSTATIC - computes a static projection of the relation
object onto static subspaces specified by static matrices
Input:
regular:
self.
projMatList: double[nSpDims,nDims]/cell[1,nProjs]
of double[nSpDims,nDims] - list of not necessarily orthogonal
projection matrices
Output:
ellTubeProjRel: smartdb.relation.StaticRelation[1, 1]/
smartdb.relation.DynamicRelation[1, 1]- projected relation
indProj2OrigVec:cell[nDims, 1] - index of the line number from
which is obtained the projection
SORTDETERMENISTICALLY - sorts fields of ATypifiedAdjustedRel
object using specified maximal tolerance
Input:
regular:
self.
maxTolerance: double[1, 1] - maximal tolerance that is
used while sorting elements of self object.
Output:
none.
THINOUTTUPLES - thins ellipsoid tube object using vector of
indices specified by the user. The function returns new
ellipsoid tube object containing only ellipsoids from the
original ellipsoid tube with indices specified in indVec.
Input:
regular:
self.
indVec: double[nIndices, 1] - indices of ellipsoids which
are to be included in new ellipsoid tube object
Output:
thinnedEllTubeRel: gras.ellapx.smartdb.rels.EllTubeBasic[1, 1] -
new ellipsoid tube object containing only ellipsoids from
self EllTube object with indices specified in indVec
A class which allows to work with static projections of unions of
ellipsoid tube objects.
Fields:
QArray: cell[1,1] of double[nDims,nDims,nTimePoints] -
a 3-dimentional matrix in which each of nTimePoints slices is a
double[nDims,nDims] projection of an ellipsoid matrix on specified
subspace at nTimePoint point of time. Here nTimePoints is number of
elements in timeVec.
aMat: cell[1,nTimePoints] of double[nDims,1] - a 2-dimentional matrix
in which each of nTimePoints columns is a projection of
an ellipsoid center. Each center is specified for
nTimePoint point of time
scaleFactor: double[1, 1] - scale for the created ellipsoid tube
MArray: cell[1,1] of double[nDims,nDims,nTimePoints] -
a 3-dimentional matrix in which each of nTimePoints slices is a
double[nDims,nDims] projection of a regularization matrix on specified
subspace at nTimePoint point of time.
dim: double[1, 1] - the dimension of the space on which the touching
curves are projected
sTime: double[1, 1] - specific point of time which is best suited to
describe good direction
approxSchemaName: cell[1, 1] of char[1,] - name of the
approximation schema
approxSchemaDescr: cell[1, 1] of char[1,] - description of the
approximation schema
approxType: gras.ellapx.enums.EApproxType[1,1] - type of approximation
(External, Internal, NotDefined)
timeVec: double[1, nTimePoints] - time vector
absTolerance: double[1, 1] - absolute tolerance
relTolerance: double[1, 1] - relative tolerance
indSTime: double[1, 1] - index of sTime point within timeVec
ltGoodDirMat: cell[1, nTimePoints] of double[nDims, 1] - matrix of
the projections of good direction vectors on the specified space
at any point of time from timeVec
lsGoodDirVec: cell[1, 1] of double[nDims, 1] - the projection of good
direction vector on the specified space at sTime point of time
ltGoodDirNormVec: cell[1, 1] of double[1, nTimePoints] - norm of the
projections of good direction vectors on the specified space at
any point of time from timeVec
lsGoodDirNorm: double[1, 1] - norm of the projection of good direction
vector on the specified space at sTime point of time
xTouchCurveMat: cell[1, nTimePoints] of double[nDims, 1] - the projection
of touch point curve on the specified space for good direction matrix
xTouchOpCurveMat: cell[1, nTimePoints] of double[nDims, 1] - the projection
of touch point curve oposite to the xTouchCurveMat touch point curve
xsTouchVec: cell[1, 1] of double[nDims, 1] - the projection of touch
point at sTime point of time
xsTouchOpVec: cell[1, 1] of double[nDims, 1] - the projection of a point
opposite to the xsTouchVec touch point
isLsTouch: logical[1, 1] - a logical variable which indicates whether
a touch takes place along good direction at sTime point of time
isLsTouchVec: cell[1, 1] of logical[nTimePoints, 1] - a logical
vector which indicates whether a touch takes place along good
direction at any point of time from timeVec
projSMat: cell[1, 1] of double[nDims, nDims] - projection matrix at
sTime point of time
projArray: cell[nTimePoints, 1] of double[nDims, nDims] - an array
of projection matrices at any point of time from timVec
projType: gras.ellapx.enums.EProjType[1, 1] - type of projection
(Static, DynamicAlongGoodCurve)
ltGoodDirNormOrigVec: cell[1, 1] of double[1, nTimePoints] - norm of
the original good direction vectors at any point of time from timeVec
lsGoodDirNormOrig: double[1, 1] - norm of the original good direction
vector at sTime point of time
ltGoodDirOrigMat: cell[1, nTimePoints] of double[nDims, 1] - matrix
of the original good direction vectors at any point of time from timeVec
lsGoodDirOrigVec: cell[1, 1] of double[nDims, 1] - the original good
direction vector at sTime point of time
ltGoodDirNormOrigProjVec: cell[1, 1] of double[1, nTimePoints] - norm
of the projection of the original good direction curve
ltGoodDirOrigProjMat: cell[1, 1] of double[nDims, nTimePoints] - the
projectition of the original good direction curve
ellUnionTimeDirection: gras.ellapx.enums.EEllUnionTimeDirection[1, 1] -
direction in time along which union is performed
timeTouchEndVec: cell [1, 1] of double[1, nTimePoints] - points of
time when touch is occured in good direction
timeTouchOpEndVec: cell [1, 1] of double[1, nTimePoints] - points of
time when touch is occured in direction opposite to good direction
isLsTouchOp: logical[1, 1] - a logical variable which indicates whether
a touch takes place along the direction opposite to the good direction
at sTime point of time
isLtTouchOpVec: cell [1, 1] of logical[nTimePoints, 1] - a logical
variable which indicates whether a touch takes place along the
direction opposite to the good direction at any point of time
from timeVec
See the description of the following methods in smartdb.relations.ATypifiedStaticRelation for smartdb.relations.ATypifiedStaticRelation:
CUT - extracts the piece of the ellipsoid tube object from given
start point of time to given end point of time.
Input:
regular:
self.
cutTimeVec: double[1, 2] / double[1, 1] - time interval to cut
Output:
cutEllTubeRel: gras.ellapx.smartdb.rels.EllTube[1, 1] -
ellipsoid tube which is created from the original one by
cutting it from given start point of time to given end
point of time
FROMELLTUBES - returns union of the ellipsoidal tubes on time
Input:
ellTubeRel: smartdb.relation.StaticRelation[1, 1]/
smartdb.relation.DynamicRelation[1, 1] - relation
object
Output:
ellUnionTubeRel: ellapx.smartdb.rel.EllUnionTube - union of the
ellipsoidal tubes
GETDATA - gets data from ATypifiedAdjustedRel object
Input:
regular:
self.
varargin:
Output:
optional:
GETELLARRAY - returns array of ellipsoids according to
approxType
Input:
regular:
self.
approxType: cell[nEllTubes, 1] of char[1,] - type of
approximation(internal/external)
Output:
apprEllMat: ellipsoid[nTimePoints, nEllTubes] - an array
of all the ellipsoids from all the ellipsoid tubes that
are stored in self object
timeVec: cell[1,1] of double[1,nTimePoints] - time vector
GETJOINWITH - returns a result of INNER join of given relation with
another relation by the specified key fields
LIMITATION: key fields by which the join is peformed are required to form
a unique key in the given relation
Input:
regular:
self:
otherRel: smartdb.relations.ARelation[1,1]
keyFieldNameList: char[1,]/cell[1,nFields] of char[1,]
properties:
joinType: char[1,] - type of join, can be
'inner' (DEFAULT)
'leftOuter'
Output:
resRel: smartdb.relations.ARelation[1,1] - join result
GETNOCATORCUTFIELDLIST - returns a list of fields of
EllUnionTubeStaticProj object, which are not to be
concatenated or cut.
Input:
regular:
self.
Output:
namePrefix: char[nFields, ] - list of fields of
EllUnionTubeStaticProj object, which are not to be
concatenated or cut
GETREACHTUBENAMEPREFIX - returns the prefix of the reach tube
Input:
regular:
self.
Output:
namePrefix: char[1, ] - prefix of the reach tube
GETREGTUBENAMEPREFIX - returns the prefix of the regular tube
Input:
regular:
self.
Output:
namePrefix: char[1, ] - prefix of the regular tube
INTERP - interpolates ellipsoidal tube on a new time vector
Input:
regular:
self.
timeVec: double[1, nTimePoints] - sorted time vector to
interpolate on. Must begin with self.timeVec[1] and
end with self.timeVec[end]
Output:
interpEllTube: gras.ellapx.smartdb.rels.EllTubeBasic[1, 1] -
interpolated ellipsoidal tube
ISEQUAL - compares current relation object with other relation
object and returns true if they are equal, otherwise it returns
false.
Input:
regular:
self.
otherObj: ARelation [1,1] - other relation object
properties:
checkFieldOrder/isFieldOrderCheck: logical [1,1] - if true,
then fields in compared relations must be in the same
order, otherwise the order is not important (false by
default)
checkTupleOrder: logical[1,1] - if true, then the tuples
in the compared relations are expected to be in the same
order, otherwise the order is not important (false by
default)
maxTolerance: double [1,1] - maximum allowed tolerance
maxRelativeTolerance: double [1,1] - maximum allowed relative
tolerance
compareMetaDataBackwardRef: logical[1,1] if true, the CubeStruct's
referenced from the meta data objects are also compared
notComparedFieldList: cell[1,nFields] of char[1,] - list
of fields that are not to be compared
areTimeBoundsCompared: logical[1,1] - if false,
ellipsoidal tubes are compared on intersection of
definition domains
Output:
isOk: logical[1, 1] - logical vector elements of
which take OK value if the fields in self and otherRel
are equal and otherwise it takes FALSE value
reportStr: char[1, ] - a report string which contains more
detailed information about inequal fields in self and
otherRel objects
PLOT - displays ellipsoidal tubes using the specified
RelationDataPlotter
Input:
regular:
self:
optional:
plObj: smartdb.disp.RelationDataPlotter[1,1] - plotter
object used for displaying ellipsoidal tubes
properties:
fGetColor: function_handle[1, 1] -
function that specified colorVec for
ellipsoidal tubes
fGetAlpha: function_handle[1, 1] -
function that specified transparency
value for ellipsoidal tubes
fGetLineWidth: function_handle[1, 1] -
function that specified lineWidth for good curves
fGetFill: function_handle[1, 1] - this
property not used in this version
colorFieldList: cell[nColorFields, ] of char[1, ] -
list of parameters for color function
alphaFieldList: cell[nAlphaFields, ] of char[1, ] -
list of parameters for transparency function
lineWidthFieldList: cell[nLineWidthFields, ]
of char[1, ] - list of parameters for lineWidth
function
fillFieldList: cell[nIsFillFields, ] of char[1, ] -
list of parameters for fill function
plotSpecFieldList: cell[nPlotFields, ] of char[1, ] -
defaul list of parameters. If for any function in
properties not specified list of parameters,
this one will be used
Output:
plObj: smartdb.disp.RelationDataPlotter[1,1] - plotter
object used for displaying ellipsoidal tubes
PLOTEXT - plots external approximation of ellTube.
Input:
regular:
obj: EllTubeProj: EllTubeProj object
optional:
relDataPlotter:smartdb.disp.RelationDataPlotter[1,1] - relation data plotter object.
colorSpec: char[1,1] - color specification code, can be 'r','g',
etc (any code supported by built-in Matlab function).
properties:
fGetColor: function_handle[1, 1] -
function that specified colorVec for
ellipsoidal tubes
fGetAlpha: function_handle[1, 1] -
function that specified transparency
value for ellipsoidal tubes
fGetLineWidth: function_handle[1, 1] -
function that specified lineWidth for good curves
fGetFill: function_handle[1, 1] - this
property not used in this version
colorFieldList: cell[nColorFields, ] of char[1, ] -
list of parameters for color function
alphaFieldList: cell[nAlphaFields, ] of char[1, ] -
list of parameters for transparency function
lineWidthFieldList: cell[nLineWidthFields, ]
of char[1, ] - list of parameters for lineWidth
function
fillFieldList: cell[nIsFillFields, ] of char[1, ] -
list of parameters for fill function
plotSpecFieldList: cell[nPlotFields, ] of char[1, ] -
defaul list of parameters. If for any function in
properties not specified list of parameters,
this one will be used
'showDiscrete':logical[1,1] -
if true, approximation in 3D will be filled in every
time slice
'nSpacePartPoins': double[1,1] -
number of points in every time slice.
Output:
regular:
plObj: smartdb.disp.RelationDataPlotter[1,1] - returns
the relation data plotter object.
Usage:
obj.plotExt() - plots external approximation of ellTube.
obj.plotExt('Property',PropValue,...) - plots external approximation
of ellTube with setting
properties.
PLOTINT - plots internal approximation of ellTube.
Input:
regular:
obj: EllTubeProj: EllTubeProj object
optional:
relDataPlotter:smartdb.disp.RelationDataPlotter[1,1] -
relation data plotter object.
colorSpec: char[1,1] - color specification code, can be
'r','g', etc (any code supported by built-in Matlab function).
properties:
fGetColor: function_handle[1, 1] -
function that specified colorVec for
ellipsoidal tubes
fGetAlpha: function_handle[1, 1] -
function that specified transparency
value for ellipsoidal tubes
fGetLineWidth: function_handle[1, 1] -
function that specified lineWidth for good curves
fGetFill: function_handle[1, 1] - this
property not used in this version
colorFieldList: cell[nColorFields, ] of char[1, ] -
list of parameters for color function
alphaFieldList: cell[nAlphaFields, ] of char[1, ] -
list of parameters for transparency function
lineWidthFieldList: cell[nLineWidthFields, ]
of char[1, ] - list of parameters for lineWidth
function
fillFieldList: cell[nIsFillFields, ] of char[1, ] -
list of parameters for fill function
plotSpecFieldList: cell[nPlotFields, ] of char[1, ] -
defaul list of parameters. If for any function in
properties not specified list of parameters,
this one will be used
'showDiscrete':logical[1,1] -
if true, approximation in 3D will be filled in every
time slice
'nSpacePartPoins': double[1,1] -
number of points in every time slice.
Output:
regular:
plObj: smartdb.disp.RelationDataPlotter[1,1] - returns
the relation data plotter object.
Usage:
obj.plotInt() - plots internal approximation of ellTube.
obj.plotInt('Property',PropValue,...) - plots internal approximation
of ellTube with setting
properties.
PROJMAT2STR - transforms the specified projection matrix at
sTime point of time into a string.
Input:
projSTimeMat: double[nDims, nDims] - projection matrix at
sTime point of time
Output:
projStrName: char[1,] - the projection matrix at sTime point
of time written as a string
Help for gras.ellapx.smartdb.rels.EllUnionTubeStaticProj.projMat2str is inherited from superclass GRAS.ELLAPX.SMARTDB.RELS.ELLTUBETOUCHCURVEPROJBASIC
PROJMAT2STR - transforms the specified row of the projection
matrix at sTime point of time into a string.
Input:
projSTimeMat: double[nDims, nDims] - projection matrix at
sTime point of time
Output:
projStrName: char[1,] - the specified row of the projection
matrix at sTime point of time written as a string
Help for gras.ellapx.smartdb.rels.EllUnionTubeStaticProj.projRow2str is inherited from superclass GRAS.ELLAPX.SMARTDB.RELS.ELLTUBETOUCHCURVEPROJBASIC
SORTDETERMENISTICALLY - sorts fields of ATypifiedAdjustedRel
object using specified maximal tolerance
Input:
regular:
self.
maxTolerance: double[1, 1] - maximal tolerance that is
used while sorting elements of self object.
Output:
none.
THINOUTTUPLES - thins ellipsoid tube object using vector of
indices specified by the user. The function returns new
ellipsoid tube object containing only ellipsoids from the
original ellipsoid tube with indices specified in indVec.
Input:
regular:
self.
indVec: double[nIndices, 1] - indices of ellipsoids which
are to be included in new ellipsoid tube object
Output:
thinnedEllTubeRel: gras.ellapx.smartdb.rels.EllTubeBasic[1, 1] -
new ellipsoid tube object containing only ellipsoids from
self EllTube object with indices specified in indVec
CUT - extracts the piece of reach tube from given start time to given
end time. Given reach set self, find states that are reachable
within time interval specified by cutTimeVec. If cutTimeVec
is a scalar, then reach set at given time is returned.
Input:
regular:
self.
cutTimeVec: double[1, 2]/double[1, 1] - time interval to cut.
Output:
cutObj: elltool.reach.IReach[1, 1] - reach set resulting from the CUT
operation.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
cutObj = rsObj.cut([3 5]);
dRsObj = elltool.reach.ReachDiscrete(dtsys, x0EllObj, dirsMat, timeVec);
dCutObj = dRsObj.cut([3 5]);
DIMENSION - returns array of dimensions of given reach set array.
Input:
regular:
self - multidimensional array of
ReachContinuous/ReachDiscrete objects
Output:
rSdimArr: double[nDim1, nDim2,...] - array of reach set dimensions.
sSdimArr: double[nDim1, nDim2,...] - array of state space dimensions.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
rsObjArr = rsObj.repMat(1,2);
[rSdim sSdim] = rsObj.dimension()
rSdim =
2
sSdim =
2
[rSdim sSdim] = rsObjArr.dimension()
rSdim =
[ 2 2 ]
sSdim =
[ 2 2 ]
DISPLAY - displays the reach set object.
Input:
regular:
self.
Output:
None.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
rsObj.display()
rsObj =
Reach set of the continuous-time linear system in R^2 in the time...
interval [0, 10].
Initial set at time t0 = 0:
Ellipsoid with parameters
Center:
0
0
Shape Matrix:
1 0
0 1
Number of external approximations: 2
Number of internal approximations: 2
EVOLVE - computes further evolution in time of the
already existing reach set.
Input:
regular:
self.
newEndTime: double[1, 1] - new end time.
optional:
linSys: elltool.linsys.LinSys[1, 1] - new linear system.
Output:
newReachObj: reach[1, 1] - reach set on time interval
[oldT0 newEndTime].
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
dRsObj = elltool.reach.ReachDiscrete(dsys, x0EllObj, dirsMat, timeVec);
newRsObj = rsObj.evolve(12);
newDRsObj = dRsObj.evolve(11);
GETABSTOL - gives the array of absTol for all elements
in rsArr
Input:
regular:
rsArr: elltool.reach.AReach[nDim1, nDim2, ...] -
multidimension array of reach sets
optional:
fAbsTolFun: function_handle[1,1] - function that is
applied to the absTolArr. The default is @min.
Output:
regular:
absTolArr: double [absTol1, absTol2, ...] - return
absTol for each element in rsArr
optional:
absTol: double[1,1] - return result of work fAbsTolFun
with the absTolArr
Usage:
use [~,absTol] = rsArr.getAbsTol() if you want get only
absTol,
use [absTolArr,absTol] = rsArr.getAbsTol() if you want
get absTolArr and absTol,
use absTolArr = rsArr.getAbsTol() if you want get only
absTolArr
Input:
regular:
self:
properties:
l0Mat: double[nDims,nDirs] - matrix of good
directions at time s
isIntExtApxVec: logical[1,2] - two element vector with the
first element corresponding to internal approximations
and second - to external ones. An element equal to
false means that the corresponding approximation type
is filtered out. Default value is [true,true]
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1; 1 1;1 2]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj,...
dirsMat, timeVec);
copyRsObj = rsObj.getCopy()
Reach set of the continuous-time linear system in R^2 in
the time interval [0, 10].
Initial set at time k0 = 0:
Ellipsoid with parameters
Center:
0
0
Shape Matrix:
1 0
0 1
Number of external approximations: 4
Number of internal approximations: 4
copyRsObj = rsObj.getCopy('l0Mat',[0;1],'approxType',...
[true,false])
Reach set of the continuous-time linear system in R^2 in
the time interval [0, 10].
Initial set at time k0 = 0:
Ellipsoid with parameters
Center:
0
0
Shape Matrix:
1 0
0 1
Number of external approximations: 1
Number of internal approximations: 1
GET_EASCALEFACTOR - return the scale factor for external approximation
of reach tube
Input:
regular:
self.
Output:
regular:
eaScaleFactor: double[1, 1] - scale factor.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [10 0];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
rsObj.getEaScaleFactor()
ans =
1.0200
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
rsObj.getEllTubeRel();
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
getEllTubeUnionRel(rsObj);
GETEXTPROBDYNAMICSLIST - returns the extProbDynamicsList
property
Input:
regular:
self: - reach tube
Output:
extProbDynamicsList: cell[1,nLinSys] of cell[1,nTube] of
gras.ellapx.lreachplain.probdyn.LReachProblemDynamicsInterp -
list of cell arrays filled with objects which describe
the system dynamics between switch time.
extProbDynamicsList is constructed during the external
approximations. If time is backward than the order of
extProbDynamicsList{:} is also backward.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
aMat2 = [0 1; 1 0]; bMat2 = [0 1;1 0];
SUBounds2 = struct();
SUBounds2.center = {'sin(t)'; 'cos(t)'};
SUBounds2.shape = [5 0; 0 3];
sys2 = elltool.linsys.LinSysContinuous(aMat2, bMat2, SUBounds2);
rsObj2=rsObj.evolve(15, sys2);
rsObj2.getExtProbDynamicsList()
ans =
{1x1 cell} {1x2 cell}
GETGOODDIRSETLIST - returns the goodDirSetList
property
Input:
regular:
self: - reach tube
Output:
goodDirSetList: cell[1,nLinSys] of cell[1,nTube] of
gras.ellapx.lreachplain.GoodDirsContinuousGen - list of
cell arrays filled with gras.ellapx.lreachplain.GoodDirsContinuousGen
objects which containe good directions and curves data
between switch time. The order of goodDirSetList{:}
corresponds to the time direction.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
aMat2 = [0 1; 1 0]; bMat2 = [0 1;1 0];
SUBounds2 = struct();
SUBounds2.center = {'sin(t)'; 'cos(t)'};
SUBounds2.shape = [5 0; 0 3];
sys2 = elltool.linsys.LinSysContinuous(aMat2, bMat2, SUBounds2);
rsObj2=rsObj.evolve(15, sys2);
rsObj2.getGoodDirSetList()
ans =
{1x1 cell} {1x2 cell}
GET_IASCALEFACTOR - return the scale factor for internal approximation
of reach tube
Input:
regular:
self.
Output:
regular:
iaScaleFactor: double[1, 1] - scale factor.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [10 0];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
rsObj.getIaScaleFactor()
ans =
1.0200
GETINITIALSET - return the initial set for linear system, which is solved
for building reach tube.
Input:
regular:
self.
Output:
regular:
x0Ell: ellipsoid[1, 1] - ellipsoid x0, which was initial set for
linear system.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [10 0];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
x0Ell = rsObj.getInitialSet()
x0Ell =
Center:
0
0
Shape Matrix:
1 0
0 1
Nondegenerate ellipsoid in R^2.
GETINTPROBDYNAMICSLIST - returns the intProbDynamicsList
property
Input:
regular:
self: - reach tube
Output:
intProbDynamicsList: cell[1,nLinSys] of cell[1,nTube] of
gras.ellapx.lreachplain.probdyn.LReachProblemDynamicsInterp -
list of of cell arrays filled with objects which describe
the system dynamics between switch time.
intProbDynamicsList is constructed during the internal
approximations and has the following structure:
{{probDynObjSys1},{probDynObjSys2dir1,...,probDynObjSys2dirn},...,
{probDynObjSyskdir1,...,probDynObjSyskdirn}}.
Nested cell arrays have dimensionality nTube equal to
the number of directions. The order of intProbDynList{:}
corresponds to the time direction.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
aMat2 = [0 1; 1 0]; bMat2 = [0 1;1 0];
SUBounds2 = struct();
SUBounds2.center = {'sin(t)'; 'cos(t)'};
SUBounds2.shape = [5 0; 0 3];
sys2 = elltool.linsys.LinSysContinuous(aMat2, bMat2, SUBounds2);
rsObj2=rsObj.evolve(15, sys2);
rsObj2.getIntProbDynamicsList()
ans =
{1x1 cell} {1x2 cell}
GETNPLOT2DPOINTS - gives array the same size as rsArr of
value of nPlot2dPoints property for each element in rsArr -
array of reach sets
Input:
regular:
rsArr:elltool.reach.AReach[nDims1,nDims2,...] - reach
set array
Output:
nPlot2dPointsArr:double[nDims1,nDims2,...] - array of
values of nTimeGridPoints property for each reach set
in rsArr
GETNPLOT3DPOINTS - gives array the same size as rsArr of
value of nPlot3dPoints property for each element in rsArr
array of reach sets
Input:
regular:
rsArr:reach[nDims1,nDims2,...] - reach set array
Output:
nPlot3dPointsArr:double[nDims1,nDims2,...]- array of values
of nPlot3dPoints property for each reach set in rsArr
GETNTIMEGRIDPOINTS - gives array the same size as rsArr of
value of nTimeGridPoints property for each element in rsArr
array of reach sets
Input:
regular:
rsArr: elltool.reach.AReach [nDims1,nDims2,...] - reach
set array
Output:
nTimeGridPointsArr: double[nDims1,nDims2,...]- array of
values of nTimeGridPoints property for each reach set
in rsArr
GETRELTOL - gives the array of relTol for all elements in
ellArr
Input:
regular:
rsArr: elltool.reach.AReach[nDim1,nDim2, ...] -
multidimension array of reach sets.
optional
fRelTolFun: function_handle[1,1] - function that is
applied to the relTolArr. The default is @min.
Output:
regular:
relTolArr: double [relTol1, relTol2, ...] - return
relTol for each element in rsArr.
optional:
relTol: double[1,1] - return result of work fRelTolFun
with the relTolArr
Usage:
use [~,relTol] = rsArr.getRelTol() if you want get only
relTol,
use [relTolArr,relTol] = rsArr.getRelTol() if you want get
relTolArr and relTol,
use relTolArr = rsArr.getRelTol() if you want get only
relTolArr
GETSYSTEMLISTLIST - returns the linSysCVec
property
Input:
regular:
self: - reach tube
Output:
linSysCVec: cell[1,nLinSys] of elltool.linsys.LinSysContinuous -
list of nLinSys objects corresponding to nLinSys systems. Each
elltool.linsys.LinSysContinuous object describes
the particular system between switch time.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
aMat2 = [0 1; 1 0]; bMat2 = [0 1;1 0];
SUBounds2 = struct();
SUBounds2.center = {'sin(t)'; 'cos(t)'};
SUBounds2.shape = [5 0; 0 3];
sys2 = elltool.linsys.LinSysContinuous(aMat2, bMat2, SUBounds2);
rsObj2=rsObj.evolve(15, sys2);
rsObj2.getSystemList()
ans =
Column 1
[1x1 elltool.linsys.LinSysContinuous]
Column 2
[1x1 elltool.linsys.LinSysContinuous]
GET_CENTER - returns the trajectory of the center of the reach set.
Input:
regular:
self.
Output:
trCenterMat: double[nDim, nPoints] - array of points that form the
trajectory of the reach set center, where nDim is reach set
dimentsion, nPoints - number of points in time grid.
timeVec: double[1, nPoints] - array of time values.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
[trCenterMat timeVec] = rsObj.get_center();
GET_DIRECTIONS - returns the values of direction vectors for time grid
values.
Input:
regular:
self.
Output:
directionsCVec: cell[1, nPoints] of double [nDim, nDir] - array of
cells, where each cell is a sequence of direction vector values
that correspond to the time values of the grid, where nPoints is
number of points in time grid.
timeVec: double[1, nPoints] - array of time values.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
[directionsCVec timeVec] = rsObj.get_directions();
GET_EA - returns array of ellipsoid objects representing external
approximation of the reach tube.
Input:
regular:
self.
Output:
eaEllMat: ellipsoid[nAppr, nPoints] - array of ellipsoids, where nAppr
is the number of approximations, nPoints is number of points in time
grid.
timeVec: double[1, nPoints] - array of time values.
l0Mat: double[nDirs,nDims] - matrix of good directions at t0
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
[eaEllMat timeVec] = rsObj.get_ea();
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
dRsObj = elltool.reach.ReachDiscrete(sys, x0EllObj, dirsMat, timeVec);
[eaEllMat timeVec] = dRsObj.get_ea();
GET_GOODCURVES - returns the 'good curve' trajectories of the reach set.
Input:
regular:
self.
Output:
goodCurvesCVec: cell[1, nPoints] of double [x, y] - array of cells,
where each cell is array of points that form a 'good curve'.
timeVec: double[1, nPoints] - array of time values.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
[goodCurvesCVec timeVec] = rsObj.get_goodcurves();
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
dRsObj = elltool.reach.ReachDiscrete(sys, x0EllObj, dirsMat, timeVec);
[goodCurvesCVec timeVec] = dRsObj.get_goodcurves();
GET_IA - returns array of ellipsoid objects representing internal
approximation of the reach tube.
Input:
regular:
self.
Output:
iaEllMat: ellipsoid[nAppr, nPoints] - array of ellipsoids, where nAppr
is the number of approximations, nPoints is number of points in time
grid.
timeVec: double[1, nPoints] - array of time values.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
[iaEllMat timeVec] = rsObj.get_ia();
GET_SYSTEM - returns the linear system for which the reach set is
computed.
Input:
regular:
self.
Output:
linSys: elltool.linsys.LinSys[1, 1] - linear system object.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
linSys = rsObj.get_system()
self =
A:
0 1
0 0
B:
1 0
0 1
Control bounds:
2-dimensional ellipsoid with center
'sin(t)'
'cos(t)'
and shape matrix
9 0
0 2
C:
1 0
0 1
2-input, 2-output continuous-time linear time-invariant system of
dimension 2:
dx/dt = A x(t) + B u(t)
y(t) = C x(t)
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
dRsObj = elltool.reach.ReachDiscrete(sys, x0EllObj, dirsMat, timeVec);
dRsObj.get_system();
INTERSECT - checks if its external (s = 'e'), or internal (s = 'i')
approximation intersects with given ellipsoid, hyperplane
or polytop.
Input:
regular:
self.
intersectObj: ellipsoid[1, 1]/hyperplane[1,1]/polytop[1, 1].
approxTypeChar: char[1, 1] - 'e' (default) - external approximation,
'i' - internal approximation.
Output:
isEmptyIntersect: logical[1, 1] - true - if intersection is nonempty,
false - otherwise.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
ellObj = ellipsoid([0; 0], 2*eye(2));
isEmptyIntersect = intersect(rsObj, ellObj)
isEmptyIntersect =
1
ISEMPTY - checks if given reach set array is an array of empty objects.
Input:
regular:
self - multidimensional array of
ReachContinuous/ReachDiscrete objects
Output:
isEmptyArr: logical[nDim1, nDim2, nDim3,...] -
isEmpty(iDim1, iDim2, iDim3,...) = true - if self(iDim1, iDim2, iDim3,...) is empty,
= false - otherwise.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
dsys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
dRsObj = elltool.reach.ReachRiscrete(dsys, x0EllObj, dirsMat, timeVec);
rsObjArr = rsObj.repMat(1,2);
dRsObjArr = dRsObj.repMat(1,2);
dRsObj.isEmpty();
rsObj.isEmpty()
ans =
0
dRsObjArr.isEmpty();
rsObjArr.isEmpty()
ans =
[ 0 0 ]
ISEQUAL - checks for equality given reach set objects
Input:
regular:
self.
reachObj:
elltool.reach.AReach[1, 1] - each set object, which
compare with self.
optional:
indTupleVec: double[1,] - tube numbers that are
compared
approxType: gras.ellapx.enums.EApproxType[1, 1] - type of
approximation, which will be compared.
properties:
notComparedFieldList: cell[1,k] - fields not to compare
in tubes. Default: LT_GOOD_DIR_*, LS_GOOD_DIR_*,
IND_S_TIME, S_TIME, TIME_VEC
areTimeBoundsCompared: logical[1,1] - treat tubes with
different timebounds as inequal if 'true'.
Default: false
Output:
regular:
ISEQUAL: logical[1, 1] - true - if reach set objects are equal.
false - otherwise.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
copyRsObj = rsObj.getCopy();
isEqual = isEqual(rsObj, copyRsObj)
isEqual =
1
ISBACKWARD - checks if given reach set object was obtained by solving
the system in reverse time.
Input:
regular:
self.
Output:
regular:
isBackward: logical[1, 1] - true - if self was obtained by solving
in reverse time, false - otherwise.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [10 0];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
rsObj.isbackward()
ans =
1
ISCUT - checks if given array of reach set objects is a cut of
another reach set object's array.
Input:
regular:
self - multidimensional array of
ReachContinuous/ReachDiscrete objects
Output:
isCutArr: logical[nDim1, nDim2, nDim3 ...] -
isCut(iDim1, iDim2, iDim3,..) = true - if self(iDim1, iDim2, iDim3,...) is a cut of the reach set,
= false - otherwise.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
dRsObj = elltool.reach.ReachRiscrete(dsys, x0EllObj, dirsMat, timeVec);
cutObj = rsObj.cut([3 5]);
cutObjArr = cutObj.repMat(2,3,4);
iscut(cutObj);
iscut(cutObjArr);
cutObj = dRsObj.cut([4 8]);
cutObjArr = cutObj.repMat(1,2);
iscut(cutObjArr);
iscut(cutObj);
ISPROJECTION - checks if given array of reach set objects is projections.
Input:
regular:
self - multidimensional array of
ReachContinuous/ReachDiscrete objects
Output:
isProjArr: logical[nDim1, nDim2, nDim3, ...] -
isProj(iDim1, iDim2, iDim3,...) = true - if self(iDim1, iDim2, iDim3,...) is projection,
= false - otherwise.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
dRsObj = elltool.reach.ReachRiscrete(dsys, x0EllObj, dirsMat, timeVec);
projMat = eye(2);
projObj = rsObj.projection(projMat);
projObjArr = projObj.repMat(3,2,2);
isprojection(projObj);
isprojection(projObjArr);
projObj = dRsObj.projection(projMat);
projObjArr = projObj.repMat(1,2);
isprojection(projObj);
isprojection(projObjArr);
plotByEa - plots external approximation of reach tube.
Usage:
plotByEa(self,'Property',PropValue,...)
- plots external approximation of reach tube
with setting properties
Input:
regular:
self: - reach tube
optional:
plObj: smartdb.disp.RelationDataPlotter[1,1] - relation
data plotter object.
charColor: char[1,1] - color specification code, can be 'r','g',
etc (any code supported by built-in Matlab function).
properties:
'fill': logical[1,1] -
if 1, tube in 2D will be filled with color.
Default value is true.
'lineWidth': double[1,1] -
line width for 2D plots. Default value is 2.
'color': double[1,3] -
sets default colors in the form [x y z].
Default value is [0 0 1].
'shade': double[1,1] -
level of transparency between 0 and 1 (0 - transparent,
1 - opaque). Default value is 0.3.
Output:
regular:
plObj: smartdb.disp.RelationDataPlotter[1,1] - returns the relation
data plotter object.
plotByIa - plots internal approximation of reach tube.
Usage:
plotByIa(self,'Property',PropValue,...)
- plots internal approximation of reach tube
with setting properties
Input:
regular:
self: - reach tube
optional:
plObj: smartdb.disp.RelationDataPlotter[1,1] - relation data
plotter object.
charColor: char[1,1] - color specification code, can be 'r','g',
etc (any code supported by built-in Matlab function).
properties:
'fill': logical[1,1] -
if 1, tube in 2D will be filled with color.
Default value is true.
'lineWidth': double[1,1] -
line width for 2D plots. Default value is 2.
'color': double[1,3] -
sets default colors in the form [x y z].
Default value is [0 1 0].
'shade': double[1,1] -
level of transparency between 0 and 1 (0 - transparent, 1 - opaque).
Default value is 0.1.
Output:
regular:
plObj: smartdb.disp.RelationDataPlotter[1,1] - returns the relation
data plotter object.
PLOT_EA - plots external approximations of 2D and 3D reach sets.
Input:
regular:
self.
optional:
colorSpec: char[1, 1] - set color to plot in following way:
'r' - red color,
'g' - green color,
'b' - blue color,
'y' - yellow color,
'c' - cyan color,
'm' - magenta color,
'w' - white color.
OptStruct: struct[1, 1] with fields:
color: double[1, 3] - sets color of the picture in the form
[x y z].
width: double[1, 1] - sets line width for 2D plots.
shade: double[1, 1] in [0; 1] interval - sets transparency level
(0 - transparent, 1 - opaque).
fill: double[1, 1] - if set to 1, reach set will be filled with
color.
Output:
None.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
rsObj.plotEa();
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
dRsObj = elltool.reach.ReachDiscrete(sys, x0EllObj, dirsMat, timeVec);
dRsObj.plotEa();
PLOTIA - plots internal approximations of 2D and 3D reach sets.
Input:
regular:
self.
optional:
colorSpec: char[1, 1] - set color to plot in following way:
'r' - red color,
'g' - green color,
'b' - blue color,
'y' - yellow color,
'c' - cyan color,
'm' - magenta color,
'w' - white color.
OptStruct: struct[1, 1] with fields:
color: double[1, 3] - sets color of the picture in the form
[x y z].
width: double[1, 1] - sets line width for 2D plots.
shade: double[1, 1] in [0; 1] interval - sets transparency level
(0 - transparent, 1 - opaque).
fill: double[1, 1] - if set to 1, reach set will be filled with
color.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
rsObj.plotIa();
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
dRsObj = elltool.reach.ReachDiscrete(sys, x0EllObj, dirsMat, timeVec);
dRsObj.plotIa();
REFINE - adds new approximations computed for the specified directions
to the given reach set or to the projection of reach set.
Input:
regular:
self.
l0Mat: double[nDim, nDir] - matrix of directions for new
approximation
Output:
regular:
reachObj: reach[1,1] - refine reach set for the directions
specified in l0Mat
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
newDirsMat = [1; -1];
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
rsObj = rsObj.refine(newDirsMat);
REPMAT - is analogous to built-in repmat function with one exception - it
copies the objects, not just the handles
Input:
regular:
self.
Output:
Array of given ReachContinuous/ReachDiscrete object's copies.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
reachObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
reachObjArr = reachObj.repMat(1,2);
reachObjArr = 1x2 array of ReachContinuous objects
ReachContinuous - computes reach set approximation of the continuous
linear system for the given time interval.
Input:
regular:
linSys: elltool.linsys.LinSys object -
given linear system .
x0Ell: ellipsoid[1, 1] - ellipsoidal set of
initial conditions.
l0Mat: double[nRows, nColumns] - initial good directions
matrix.
timeVec: double[1, 2] - time interval.
properties:
isRegEnabled: logical[1, 1] - if it is 'true' constructor
is allowed to use regularization.
isJustCheck: logical[1, 1] - if it is 'true' constructor
just check if square matrices are degenerate, if it is
'false' all degenerate matrices will be regularized.
regTol: double[1, 1] - regularization precision.
Output:
regular:
self - reach set object.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
See the description of the following methods in elltool.reach.AReach for elltool.reach.AReach:
ReachDiscrete - computes reach set approximation of the discrete linear
system for the given time interval.
Input:
linSys: elltool.linsys.LinSys object - given linear system
x0Ell: ellipsoid[1, 1] - ellipsoidal set of initial conditions
l0Mat: double[nRows, nColumns] - initial good directions
matrix.
timeVec: double[1, 2] - time interval
properties:
isRegEnabled: logical[1, 1] - if it is 'true' constructor
is allowed to use regularization.
isJustCheck: logical[1, 1] - if it is 'true' constructor
just check if square matrices are degenerate, if it is
'false' all degenerate matrices will be regularized.
regTol: double[1, 1] - regularization precision.
minmax: logical[1, 1] - field, which:
= 1 compute minmax reach set,
= 0 (default) compute maxmin reach set.
Output:
regular:
self - reach set object.
Example:
adMat = [0 1; -1 -0.5];
bdMat = [0; 1];
udBoundsEllObj = ellipsoid(1);
dtsys = elltool.linsys.LinSysDiscrete(adMat, bdMat, udBoundsEllObj);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
dRsObj = elltool.reach.ReachDiscrete(dtsys, x0EllObj, dirsMat, timeVec);
See the description of the following methods in elltool.reach.AReach for elltool.reach.AReach:
Example:
import elltool.reach.ReachFactory;
crm=gras.ellapx.uncertcalc.test.regr.conf.ConfRepoMgr();
crmSys=gras.ellapx.uncertcalc.test.regr.conf.sysdef.ConfRepoMgr();
rsObj = ReachFactory('demo3firstTest', crm, crmSys, false, false);
Example:
import elltool.reach.ReachFactory;
crm=gras.ellapx.uncertcalc.test.regr.conf.ConfRepoMgr();
crmSys=gras.ellapx.uncertcalc.test.regr.conf.sysdef.ConfRepoMgr();
rsObj = ReachFactory('demo3firstTest', crm, crmSys, false, false);
reachObj = rsObj.createInstance();
Example:
import elltool.reach.ReachFactory;
crm=gras.ellapx.uncertcalc.test.regr.conf.ConfRepoMgr();
crmSys=gras.ellapx.uncertcalc.test.regr.conf.sysdef.ConfRepoMgr();
rsObj = ReachFactory('demo3firstTest', crm, crmSys, false, false);
dim = rsObj.getDim();
Example:
import elltool.reach.ReachFactory;
crm=gras.ellapx.uncertcalc.test.regr.conf.ConfRepoMgr();
crmSys=gras.ellapx.uncertcalc.test.regr.conf.sysdef.ConfRepoMgr();
rsObj = ReachFactory('demo3firstTest', crm, crmSys, false, false);
isJustCheck = rsObj.getIsJustCheck();
Example:
import elltool.reach.ReachFactory;
crm=gras.ellapx.uncertcalc.test.regr.conf.ConfRepoMgr();
crmSys=gras.ellapx.uncertcalc.test.regr.conf.sysdef.ConfRepoMgr();
rsObj = ReachFactory('demo3firstTest', crm, crmSys, false, false);
isRegEnabled = rsObj.getIsRegEnabled();
Example:
import elltool.reach.ReachFactory;
crm=gras.ellapx.uncertcalc.test.regr.conf.ConfRepoMgr();
crmSys=gras.ellapx.uncertcalc.test.regr.conf.sysdef.ConfRepoMgr();
rsObj = ReachFactory('demo3firstTest', crm, crmSys, false, false);
l0Mat = rsObj.getL0Mat()
l0Mat =
1 0
0 1
Example:
import elltool.reach.ReachFactory;
crm=gras.ellapx.uncertcalc.test.regr.conf.ConfRepoMgr();
crmSys=gras.ellapx.uncertcalc.test.regr.conf.sysdef.ConfRepoMgr();
rsObj = ReachFactory('demo3firstTest', crm, crmSys, false, false);
linSys = rsObj.getLinSys();
Example:
import elltool.reach.ReachFactory;
crm=gras.ellapx.uncertcalc.test.regr.conf.ConfRepoMgr();
crmSys=gras.ellapx.uncertcalc.test.regr.conf.sysdef.ConfRepoMgr();
rsObj = ReachFactory('demo3firstTest', crm, crmSys, false, false);
regTol = rsObj.getRegTol();
Example:
import elltool.reach.ReachFactory;
crm=gras.ellapx.uncertcalc.test.regr.conf.ConfRepoMgr();
crmSys=gras.ellapx.uncertcalc.test.regr.conf.sysdef.ConfRepoMgr();
rsObj = ReachFactory('demo3firstTest', crm, crmSys, false, false);
tVec = rsObj.getTVec()
tVec =
0 10
Example:
import elltool.reach.ReachFactory;
crm=gras.ellapx.uncertcalc.test.regr.conf.ConfRepoMgr();
crmSys=gras.ellapx.uncertcalc.test.regr.conf.sysdef.ConfRepoMgr();
rsObj = ReachFactory('demo3firstTest', crm, crmSys, false, false);
X0Ell = rsObj.getX0Ell()
X0Ell =
Center:
0
0
Shape Matrix:
0.0100 0
0 0.0100
Nondegenerate ellipsoid in R^2.
ALinSys - constructor abstract class of linear system.
Continuous-time linear system:
dx/dt = A(t) x(t) + B(t) u(t) + C(t) v(t)
Discrete-time linear system:
x[k+1] = A[k] x[k] + B[k] u[k] + C[k] v[k]
Input:
regular:
atInpMat: double[nDim, nDim]/cell[nDim, nDim] - matrix A.
btInpMat: double[nDim, kDim]/cell[nDim, kDim] - matrix B.
uBoundsEll: ellipsoid[1, 1]/struct[1, 1] - control bounds
ellipsoid.
ctInpMat: double[nDim, lDim]/cell[nDim, lDim] - matrix G.
vBoundsEll: ellipsoid[1, 1]/struct[1, 1] - disturbance bounds
ellipsoid.
discrFlag: char[1, 1] - if discrFlag set:
'd' - to discrete-time linSys
not 'd' - to continuous-time linSys.
Output:
self: elltool.linsys.ALinSys[1, 1] -
linear system.
DIMENSION - returns dimensions of state, input, output and disturbance
spaces.
Input:
regular:
self: elltool.linsys.LinSys[nDims1, nDims2,...] - an array of
linear systems.
Output:
stateDimArr: double[nDims1, nDims2,...] - array of state space
dimensions.
inpDimArr: double[nDims1, nDims2,...] - array of input dimensions.
distDimArr: double[nDims1, nDims2,...] - array of disturbance
dimensions.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
[stateDimArr, inpDimArr, outDimArr, distDimArr] = sys.dimension()
stateDimArr =
2
inpDimArr =
2
distDimArr =
0
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
dsys.dimension();
DISPLAY - displays the details of linear system object.
Input:
regular:
self: elltool.linsys.ALinSys[1, 1] - linear system.
Output:
None.
GETABSTOL - gives array the same size as linsysArr with values of absTol
properties for each hyperplane in hplaneArr.
Input:
regular:
self: elltool.linsys.LinSys[nDims1, nDims2,...] - an array of linear
systems.
Output:
absTolArr: double[nDims1, nDims2,...] - array of absTol properties for
linear systems in self.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
sys.getAbsTol();
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
dsys.getAbsTol();
Input:
regular:
self: elltool.linsys.ILinSys[1, 1] - linear system.
Output:
aMat: double[aMatDim, aMatDim]/cell[nDim, nDim] - matrix A.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
aMat = dsys.getAtMat();
Input:
regular:
self: elltool.linsys.ILinSys[1, 1] - linear system.
Output:
bMat: double[bMatDim, bMatDim]/cell[bMatDim, bMatDim] - matrix B.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
bMat = dsys.getBtMat();
GETCOPY - gives array the same size as linsysArr with with copies of
elements of self.
Input:
regular:
self: elltool.linsys.ALinSys[nDims1, nDims2,...] - an array of
linear systems.
Output:
copyLinSysArr: elltool.linsys.LinSys[nDims1, nDims2,...] - an array of
copies of elements of self.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
newSys = sys.getCopy();
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
newDSys = dsys.getCopy();
Input:
regular:
self: elltool.linsys.ILinSys[1, 1] - linear system.
Output:
cMat: double[cMatDim, cMatDim]/cell[cMatDim, cMatDim] - matrix C.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
gMat = sys.getCtMat();
Input:
regular:
self: elltool.linsys.ILinSys[1, 1] - linear system.
Output:
distEll: ellipsoid[1, 1]/struct[1, 1] - disturbance bounds ellipsoid.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
distEll = sys.getDistBoundsEll();
Input:
regular:
self: elltool.linsys.ILinSys[1, 1] - linear system.
Output:
uEll: ellipsoid[1, 1]/struct[1, 1] - control bounds ellipsoid.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
uEll = dsys.getUBoundsEll();
HASDISTURBANCE - returns true if system has disturbance
Input:
regular:
self: elltool.linsys.LinSys[nDims1, nDims2,...] - an array of
linear systems.
optional:
isMeaningful: logical[1,1] - if true(default), treat constant
disturbance vector as absence of disturbance
Output:
isDisturbanceArr: logical[nDims1, nDims2,...] - array such that it's
element at each position is true if corresponding linear system
has disturbance, and false otherwise.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
sys.hasDisturbance()
ans =
0
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
dsys.hasDisturbance();
ISEMPTY - checks if linear system is empty.
Input:
regular:
self: elltool.linsys.LinSys[nDims1, nDims2,...] - an array of linear
systems.
Output:
isEmptyMat: logical[nDims1, nDims2,...] - array such that it's element at
each position is true if corresponding linear system is empty, and
false otherwise.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
sys.isEmpty()
ans =
0
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
dsys.isEmpty();
ISEQUAL - produces produces logical array the same size as
self/compLinSysArr (if they have the same).
isEqualArr[iDim1, iDim2,...] is true if corresponding
linear systems are equal and false otherwise.
Input:
regular:
self: elltool.linsys.ILinSys[nDims1, nDims2,...] - an array of
linear systems.
compLinSysArr: elltool.linsys.ILinSys[nDims1,...nDims2,...] - an
array of linear systems.
Output:
isEqualArr: elltool.linsys.LinSys[nDims1, nDims2,...] - an array of
logical values.
isEqualArr[iDim1, iDim2,...] is true if corresponding linear systems
are equal and false otherwise.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
newSys = sys.getCopy();
isEqual = sys.isEqual(newSys)
isEqual =
1
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
newDSys = sys.getCopy();
isEqual = dsys.isEqual(newDSys)
isEqual =
1
ISLTI - checks if linear system is time-invariant.
Input:
regular:
self: elltool.linsys.LinSys[nDims1, nDims2,...] - an array of linear
systems.
Output:
isLtiMat: logical[nDims1, nDims2,...] -array such that it's element at
each position is true if corresponding linear system is
time-invariant, and false otherwise.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
isLtiArr = sys.isLti();
dsys = elltool.linsys.LinSysDiscrete(aMat, bMat, SUBounds);
isLtiArr = dsys.isLti();
LINSYSCONTINUOUS - Constructor of continuous linear system object.
Continuous-time linear system:
dx/dt = A(t) x(t) + B(t) u(t) + C(t) v(t)
Input:
regular:
atInpMat: double[nDim, nDim]/cell[nDim, nDim] - matrix A.
btInpMat: double[nDim, kDim]/cell[nDim, kDim] - matrix B.
optional:
uBoundsEll: ellipsoid[1, 1]/struct[1, 1] - control bounds
ellipsoid.
ctInpMat: double[nDim, lDim]/cell[nDim, lDim] - matrix G.
distBoundsEll: ellipsoid[1, 1]/struct[1, 1] - disturbance
bounds ellipsoid.
discrFlag: char[1, 1] - if discrFlag set:
'd' - to discrete-time linSys,
not 'd' - to continuous-time linSys.
Output:
self: elltool.linsys.LinSysContinuous[1, 1] - continuous linear
system.
Example:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
See the description of the following methods in elltool.linsys.ALinSys for elltool.linsys.ALinSys:
LINSYSDISCRETE - constructor of discrete linear system object.
Discrete-time linear system:
x[k+1] = A[k] x[k] + B[k] u[k] + C[k] v[k]
Input:
regular:
atInpMat: double[nDim, nDim]/cell[nDim, nDim] - matrix A.
btInpMat: double[nDim, kDim]/cell[nDim, kDim] - matrix B.
optional:
uBoundsEll: ellipsoid[1, 1]/struct[1, 1] - control bounds
ellipsoid.
ctInpMat: double[nDim, lDim]/cell[nDim, lDim] - matrix G.
distBoundsEll: ellipsoid[1, 1]/struct[1, 1] - disturbance bounds
ellipsoid.
discrFlag: char[1, 1] - if discrFlag set:
'd' - to discrete-time linSys
not 'd' - to continuous-time linSys.
Output:
self: elltool.linsys.LinSysDiscrete[1, 1] - discrete linear system.
Example:
for k = 1:20
atMat = {'0' '1 + cos(pi*k/2)'; '-2' '0'};
btMat = [0; 1];
uBoundsEllObj = ellipsoid(4);
ctMat = [1; 0];
distBounds = 1/(k+1);
lsys = elltool.linsys.LinSysDiscrete(atMat, btMat,...
uBoundsEllObj, ctMat,distBounds);
end
See the description of the following methods in elltool.linsys.ALinSys for elltool.linsys.ALinSys:
Factory class of linear system objects of the Ellipsoidal Toolbox.
CREATE - returns linear system object.
Continuous-time linear system:
dx/dt = A(t) x(t) + B(t) u(t) + C(t) v(t)
Discrete-time linear system:
x[k+1] = A[k] x[k] + B[k] u[k] + C[k] v[k]
Input:
regular:
atInpMat: double[nDim, nDim]/cell[nDim, nDim] - matrix A.
btInpMat: double[nDim, kDim]/cell[nDim, kDim] - matrix B.
uBoundsEll: ellipsoid[1, 1]/struct[1, 1] - control bounds
ellipsoid.
ctInpMat: double[nDim, lDim]/cell[nDim, lDim] - matrix G.
distBoundsEll: ellipsoid[1, 1]/struct[1, 1] - disturbance bounds
ellipsoid.
discrFlag: char[1, 1] - if discrFlag set:
'd' - to discrete-time linSys
not 'd' - to continuous-time linSys.
Output:
linSys: elltool.linsys.LinSysContinuous[1, 1]/
elltool.linsys.LinSysDiscrete[1, 1] - linear system.
Examples:
aMat = [0 1; 0 0]; bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysFactory.create(aMat, bMat,SUBounds);