Set
evaluates
value
and assigns it toexpr
.
sets multiple symbols
(s1, s2, ...)
to the corresponding values(v1, v2, ...)
.
Examples
Set
can be used to give a symbol a value:
You can set multiple values at once using lists:
Set
evaluates its right-hand side immediately and assigns it to the left-hand side:
‘Set’ always returns the right-hand side, which you can again use in an assignment:
‘Set’ supports assignments to parts:
Set a submatrix:
Related terms
SetDelayed, TagSet, TagSetDelayed
Implementation status
- ✅ - full supported