Grocer Function

NAME

defaultcoef - finds default coefficients in equations

CALLING SEQUENCE

coef=defaultcoef(defaultname,speccarb,speccara,arg1,...,argn)

PARAMETERS

Input

Output

coef=a (nx1) vector of coefficients names

DESCRIPTION

Determines the list of default coefs names in a set of equations

EXAMPLE

1) defaultcoef('co',['=' ; '+' ; '(' ; '-' ; '*'],['+' ; '-' ; '*' ; '/' ; ')'],'y=co1+co2*x1+(co3-co2)*x2')  
2) grocer_namecoef=defaultcoef('a',grocer_speccarb,grocer_speccara,varargin(:)) In example1, the coefficients are prefixed by co; they are asumed to be preceded by '=', '+', '(', '-' or '*'  and followed by '+', '-', '*', '/', or ')'; the equation is 'y=co1+co2*x1+(co3-co2)*x2'. The result is:
!co1   !
!         !
!co2   !
!         !
!co3   !

Example 2 is taken from function sur.

AUTHOR

Eric Dubois 2002