Back to Symbolic Mathematics
subs
Substitute in symbolic expression
Syntax
g = subs(f, old, new) g = subs(f, var, value)
Description
Substitutes old with new in the symbolic expression f. Can substitute a variable with a value or an expression with another expression. Useful for evaluating symbolic expressions at specific values or simplifying by replacement.
Parameters
| Name | Description |
|---|---|
| f | Symbolic expression |
| old | Symbol or expression to replace |
| new | Replacement value or expression |
Returns
Expression with substitution applied