Difference between revisions of "Substitute Command"
From GeoGebra Manual
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=4.2}}</noinclude>{{betamanual|version=4.2}} | <noinclude>{{Manual Page|version=4.2}}</noinclude>{{betamanual|version=4.2}} | ||
− | {{command| | + | {{command|geogebra}} |
;Substitute[ <expression>, <from>, <to> ] | ;Substitute[ <expression>, <from>, <to> ] | ||
:Substitutes ''from'' in ''expression'' with ''to''. | :Substitutes ''from'' in ''expression'' with ''to''. | ||
:{{example| 1=<div><code><nowiki>Substitute[(3 m - 3)^2 - (m + 3)^2, m, a]</nowiki></code> yields ''8 a<sup>2</sup> - 24 a''.</div>}} | :{{example| 1=<div><code><nowiki>Substitute[(3 m - 3)^2 - (m + 3)^2, m, a]</nowiki></code> yields ''8 a<sup>2</sup> - 24 a''.</div>}} | ||
+ | |||
;Substitute[ <Expression>, <Substitution List> ] | ;Substitute[ <Expression>, <Substitution List> ] | ||
:Substitutes in ''expression'' every variable of the list with the variable or number you choose for it. | :Substitutes in ''expression'' every variable of the list with the variable or number you choose for it. | ||
:{{example| 1=<div><code><nowiki>Substitute[2x + 3y - z, {x=a, y=2, z=b}]</nowiki></code> yields ''2a - b + 6''.</div>}} | :{{example| 1=<div><code><nowiki>Substitute[2x + 3y - z, {x=a, y=2, z=b}]</nowiki></code> yields ''2a - b + 6''.</div>}} |
Revision as of 11:32, 19 December 2012
This page is about a feature that is supported only in GeoGebra 4.2. |
- Substitute[ <expression>, <from>, <to> ]
- Substitutes from in expression with to.
- Example:
Substitute[(3 m - 3)^2 - (m + 3)^2, m, a]
yields 8 a2 - 24 a.
- Substitute[ <Expression>, <Substitution List> ]
- Substitutes in expression every variable of the list with the variable or number you choose for it.
- Example:
Substitute[2x + 3y - z, {x=a, y=2, z=b}]
yields 2a - b + 6.