Difference between revisions of "UnitVector Command"
From GeoGebra Manual
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude> | <noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude> | ||
{{command|vector-matrix}} | {{command|vector-matrix}} | ||
+ | ; UnitVector[Vector]: Yields a vector with length 1, which has the same direction and orientation as the given vector. | ||
+ | : {{Example|1=<code>UnitVector[{2, 4, 4}]</code> returns ''{<math>\frac{1}{3}</math>, <math>\frac{2}{3}</math>, <math>\frac{2}{3}</math>}''.}} | ||
; UnitVector[Line]: Yields the direction vector of the given line, with length 1 . | ; UnitVector[Line]: Yields the direction vector of the given line, with length 1 . | ||
− | |||
; UnitVector[Segment]: Yields the direction vector of the given segment, with length 1 | ; UnitVector[Segment]: Yields the direction vector of the given segment, with length 1 | ||
==CAS Specific Syntax== | ==CAS Specific Syntax== | ||
In [[CAS View]] only one syntax is allowed: | In [[CAS View]] only one syntax is allowed: | ||
; UnitVector[Vector]: Yields a vector with length 1, which has the same direction and orientation as the given vector. | ; UnitVector[Vector]: Yields a vector with length 1, which has the same direction and orientation as the given vector. | ||
− | + | : {{Example|1=<code>UnitVector[{a,b}]</code> returns ''{<math>\frac{a}{\sqrt{a²+b²}}</math>,<math>\frac{b}{\sqrt{a²+b²}}</math>}''.}} | |
− | : {{Example|1= | ||
− |
Revision as of 11:08, 11 August 2011
- UnitVector[Vector]
- Yields a vector with length 1, which has the same direction and orientation as the given vector.
- Example:
UnitVector[{2, 4, 4}]
returns {\frac{1}{3}, \frac{2}{3}, \frac{2}{3}}.
- UnitVector[Line]
- Yields the direction vector of the given line, with length 1 .
- UnitVector[Segment]
- Yields the direction vector of the given segment, with length 1
CAS Specific Syntax
In CAS View only one syntax is allowed:
- UnitVector[Vector]
- Yields a vector with length 1, which has the same direction and orientation as the given vector.
- Example:
UnitVector[{a,b}]
returns {\frac{a}{\sqrt{a²+b²}},\frac{b}{\sqrt{a²+b²}}}.