Name
findcoef — find coefficients in an equation
CALLING SEQUENCE
[coef]=findcoef(str,car)
PARAMETERS
- Input
str = the equation analyzed
car = the default car for the beginning of the coefficients
- Output
coef = the names of the coefficients
DESCRIPTION
In an equation where the coefficients are given by default (car1,
,carn) finds the last coefficient in this equation and infer the names of the coefficients
EXAMPLE
findcoef('a1+a2*x1+(a3-a2)*x2+(a4-a3)*a5b','a')
//returns ['a1';'a2';'a3';'a4']. The main usage is in econometric functions where the user must give the text of an equation (nls, twosls, threesls,…).