<< add_derivative Symbolic Analysis deriv_eq >>

Grocer >> Symbolic Analysis > analyse_eq

analyse_eq

breaks down an equation into elementary bricks

CALLING SEQUENCE

resout=analyse_eq(equation)

PARAMETERS

Input

* equation = a string, the text of an equation

 

Output

* resout = a tlist, whose type is equation, with as 2nd argument the type of the operation, which can be:

  - 'operation' (such as '+', '*', '.*' , ...); in that case there are the following fields:

   . 'lhs': an 'equation' tlist relative to the left hand side of the operation

   . 'operator': the operator (!)

   . 'rhs': an 'equation' tlist relative to the right hand side of the operation

  - 'unary' (when a unary '-', as opposed to the operator, has been found); in that case there is the following field:

   . 'rhs': the equation' tlist relative to the expression after the '-'

  - 'parentheses'; in that case there is the following field:

   . 'exp': the equation' tlist relative to expression between the parentheses

  - 'function'; in that case there is the following field:

   . 'input': the 'equation' tlist relative to the input of the function

  - 'scalar'; in that case there is the following field:

   . 'val': a string, the value of the number that represents the equation

  - 'variable'; in that case there is the following field:

   . 'name vari': a string, the name of the found variable, assessed as such if it is a matrix or a ts

  - 'unknown'; in that case there is the following field:

   . 'name unknown': a string, the name of the found unknown object

DESCRIPTION

Breaks down an equation into elementary bricks.

EXAMPLE

eq='a*x^2+b*sin(0.5*x)';
an_eq=analyse_eq(eq);
[eqd,reseq_d]=deriv_eq(an_eq,'x');

AUTHOR

Eric Dubois 2012

Report an issue
<< add_derivative Symbolic Analysis deriv_eq >>