equa2vecmat: Parse linear equations/inequalities

equa2vecmatR Documentation

Parse linear equations/inequalities

Description

parse a text vector of linear equations and produce a corresponding matrix and right hand side vector

Usage

equa2vecmat(nm_par, linear, sep = "=")

Arguments

nm_par

a string vector of variable names. It will be used in the symbolic derivation.

linear

string vector of linear equations like "a+2*c+3*b = 0"

sep

separator of two parts of equations. Use for example ">=" for linear inequalities

Value

an augmented matrix. Its first column is the rhs vector. Other columns are named by nm_par. If the vector linear is NULL or its content is empty a NULL is returned

Examples

equa2vecmat(c("a", "b", "c"), "a+2*c+3*b = 0", "=")

nlsic documentation built on July 10, 2023, 2:03 a.m.

Related to equa2vecmat in nlsic...