SubtractFrom
x-=dx
subtracts dx from x and returns the new value of x.
Details
- x-=dx is equivalent to x=x-dx.
- SubtractFrom has the attribute HoldFirst.
- In SubtractFrom[x,dx], x can be a symbol or other expression with an existing value. »
Examples
open allclose allBasic Examples (1)
Scope (4)
Subtract from a numerical value:
Subtract from a symbolic value:
Subtract from all values in a list:
The first argument to SubtractFrom need not be a symbol:
Properties & Relations (3)
SubtractFrom is a short form of this assignment:
PreDecrement is a special case of SubtractFrom:
AddTo is closely related:
Text
Wolfram Research (1988), SubtractFrom, Wolfram Language function, https://reference.wolfram.com/language/ref/SubtractFrom.html.
CMS
Wolfram Language. 1988. "SubtractFrom." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SubtractFrom.html.
APA
Wolfram Language. (1988). SubtractFrom. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SubtractFrom.html