Symbolics > Working with Symbolics > Solving Equations Using the generated and eval modifiers
Solving Equations Using the generated and eval modifiers
1. Define and solve two equations for the variables using a Boolean operator and solve. The solution is returned in terms of z.
Click to copy this expression
2. Evaluate the values of the variables assuming all the values greater than 0.
Click to copy this expression
The result is returned for z between 4 and 8 or else it is undefined.
3. Evaluate the variable values less than 4 using generated. generated does not make assignment or substitution in values.
Click to copy this expression
The result is undefined since the generated value is assumed to be less than 4.
4. Next, evaluate equations for the generated value equal to 6.
Click to copy this expression
5. Evaluate the generated value using eval value 6.
Click to copy this expression
Here we use eval to substitute the value for the generated variable.
Was this helpful?