<< dblist Basic functions detrend >>

Grocer >> Basic functions > defaultcoef

defaultcoef

finds default coefficients in equations

CALLING SEQUENCE

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

PARAMETERS

Input

* defaultname = a string (default prefix of the coefficients)

* speccarb = the characters that must be before a coefficient to be sure that defaultname is not part of the name of another object

* speccara = the characters that must be after a coefficient to be sure that defaultname is not part of the name of another object

* argi = a string representing the text of an equation

 

Output

* coef = a (nx1) vector of coefficients names

DESCRIPTION

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

EXAMPLE

defaultcoef('co',['=' ; '+' ; '(' ; '-' ; '*'],['+' ; '-' ; '*' ; '/' ; ')'],'y=co1+co2*x1+(co3-co2)*x2')  
//The coefficients are supposed prefixed by co, to be preceded by '=', '+', '(', '-' or '*' and followed by '+', '-', '*', '/', or ')';
// the equation is 'y=co1+co2*x1+(co3-co2)*x2'.
// and the result is:
 
//!co1   !
//!         !
//!co2   !
//!         !
//!co3   !
 
grocer_namecoef=defaultcoef('a',grocer_speccarb,grocer_speccara,varargin(:))
// Example taken from function sur.

AUTHOR

Eric Dubois 2002

Report an issue
<< dblist Basic functions detrend >>