FEATool Multiphysics  v1.16.4
Finite Element Analysis Toolbox
parseexpr.m File Reference


PARSEEXPR Parses a string expression.

[ S_EXPR, CSUBEXPR ] = PARSEEXPR( S_EXPR, S_SUBEXPR, C_ALLOWEXPR ) Parses the string expression in S_EXPR and returns a cell array CSUBEXPR with variable expressions to process. Also returns a modified expression S_EXPR which has the sub variable names substituted with S_SUBEXPR(:,I) where I is the index in CSUBEXPR to the corresponding variable. This enables a call to EVAL(S_EXPR) after the expressions in CSUBEXPR has been computed and copied to the S_SUBEXPR array. The optional array C_ALLOWEXPR allows strings as subexpressions (which function names would otherwise be removed).

See also