Grocer Function

NAME

findcoef - find coefficients in an equation

CALLING SEQUENCE

[coef]=findcoef(str,car)

PARAMETERS

Input

Output

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')

This example gives ['a1';'a2';'a3';'a4']. The main usage is in econometric functions where the user must give the text of an equation (nls, twosls, threesls,...).

AUTHOR

Eric Dubois 2002