Grocer Function

NAME

eqlist - recovers objects names in an equation

CALLING SEQUENCE

[namey,ncoefeqi,lexo]=eqlist(eq,coef)

PARAMETERS

Input

Output

DESCRIPTION

Recovers from an equation the name of the endogenous variable, the indexes of the coefficients (in a vector) and the names of the exogenous variables (also in a vector).

EXAMPLE

1) [nyi,ncoefi,lexoi]=eqlist('y1=c1*x1+c2*x2',['c1';'c2'])
2) [grocer_nyi,grocer_ncoefi,grocer_lexoi]=eqlist(varargin(grocer_i),grocer_coef)

Example 1 extracts in nyi y1, in ncoefi [1;2] and in lexoi ['x1';'x2'].
Example 2 is taken from function twosls.

AUTHOR

Eric Dubois 2002