Substitute Variables VI

Owning Palette: Formula Parsing VIs

Requires: Full Development System

Substitutes a formula string by given rules. The rules have a parameter name - parameter content structure.

Details  Example

 Add to the block diagram  Find on the palette
original formula is a string representing the formula where parameter names stand for formulas.
Substitution Rules is an array of clusters describing the substitution rules.
parameter name can have any length. A parameter name that begins with a capital letter E can produce unpredictable errors, if parts of the original string represent numbers like 1E–2. Avoid terms beginning with E in such cases.
parameter content must have a one-to-one relation with parameter name.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
formula after substitution is the final formula after all substitution rules are performed.
error out contains error information. This output provides standard error out functionality.

Substitute Variables Details

For example, the inputs have the following values:

The resulting formula after substitution is (sin(t))*cos(t) + (2*t*exp(t)).

Example

Refer to the Street Illumination Problem VI in the labview\examples\Mathematics\Scripts and Formulas directory for an example of using the Substitute Variables VI.

 Open example  Find related examples