visuEq: Displays the models Equations

visuEqR Documentation

Displays the models Equations


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.


  nVar = NULL,
  dMax = NULL,
  dMin = 0,
  substit = 0,
  approx = FALSE,
  selecmod = NULL



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


The number of variables


The maximum degree allowed in the formulation


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


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.


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.


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.


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


Sylvain Mangiarotti


# number of variables:
nVar <- 3
# maximum polynomial degree:
dMax <- 2
# polynomial organization:
# 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.