visuEq: Displays the models Equations

visuEqR Documentation

Displays the models Equations

Description

Displays the model equations for a polynomial model which description is provided as a matrix K, each column corresponding to one equation. The coefficients of the polynomial terms are given following the order defined by function poLabs. The matrix can also be provided in a list K, in this case, the matrix should be located in K$model[[selecmod]] where selecmod should be provided as input parameter.

Usage

visuEq(
  K,
  nVar = NULL,
  dMax = NULL,
  dMin = 0,
  substit = 0,
  approx = FALSE,
  selecmod = NULL
)

Arguments

K

A matrix providing the model description: each column corresponds to one equation which polynomial organisation is following the convention defined by function poLabs.

nVar

The number of variables

dMax

The maximum degree allowed in the formulation

dMin

The minimum negative degree of the polynomial formulation (0 by default).

substit

Applies subtitutions to the default values: for substit = 0 (default value), variables are chosen as X1, X2, ... for substit = 1, variable X1, X2, ... will be replaced by x, y, z, ... for substit = 2, the codes provides a LaTex-like formulation of the model. The variables name can also be defined explicitely as follows: for substit = c('x', 'H', 'T1'), variables X1, X2, X3 ... will be replaced by x, H and T1.

approx

The number of extra digits to be used: for approx = FALSE (default value) digits are edited with double precision; for approx = TRUE, only the minimum number of digits is edited (in order to have all the terms different from 0) for approx = 1, 2, etc. then respectively 1, 2, etc. digits are added to the minimum number of digits corresponding to approx = TRUE.

selecmod

An integer providing the number in the sublist when the model matrix is provided in a list. Should not be provided (or NULL) if the model matrix is provided directly.

Value

N A list of Nvar elements presenting a set of equtions, each equation being an element of this list and written as a character strings

Author(s)

Sylvain Mangiarotti

Examples

#EQUATIONS VISUALISATION
# number of variables:
nVar <- 3
# maximum polynomial degree:
dMax <- 2
# polynomial organization:
poLabs(nVar,dMax)
# model construction
KL = matrix(0, ncol = 3, nrow = 10)
KL[1,1] <- KL[2,2] <- 1
KL[4,1] <- -1
KL[5,3] <- -0.123456789
# Equations visualisation:
# (a) by default, variables names X1, X2, X3 are used
visuEq(KL, nVar, dMax)
# (b) for susbstit=1, variables names x, y, y are used instead
visuEq(KL, nVar, dMax, approx = TRUE, substit=1)
# (c) the name of the variables can also be chosen manualy
visuEq(KL, nVar, dMax, approx = 3, substit=c('U', 'V', 'W'))

# A canonical model can be provided as a single vector
polyTerms <- c(0.2,0,-1,0.5,0,0,0,0,0,0)
visuEq(polyTerms, 3,2)


GPoM documentation built on July 9, 2023, 6:23 p.m.