Difference between revisions of "Length Command"

From GeoGebra Manual
Jump to: navigation, search
(fix errors in CAS Syntax)
(command syntax: changed [ ] into ( ))
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=5}}</noinclude>{{command|cas=true|geometry}}
 
<noinclude>{{Manual Page|version=5}}</noinclude>{{command|cas=true|geometry}}
;Length[ <Object> ]
+
;Length( <Object> )
 
:Yields the length of the object.
 
:Yields the length of the object.
 
{{examples|1=<div>
 
{{examples|1=<div>
*<code><nowiki>Length[ <Vector> ]</nowiki></code> yields the length of the vector.
+
*<code><nowiki>Length( <Vector> )</nowiki></code> yields the length of the vector.
*<code><nowiki>Length[ <Point> ]</nowiki></code> yields the length of the position vector of the given point.
+
*<code><nowiki>Length( <Point> )</nowiki></code> yields the length of the position vector of the given point.
*<code><nowiki>Length[ <List> ]</nowiki></code> yields the length of the list, which is the number of elements in the list.
+
*<code><nowiki>Length( <List> )</nowiki></code> yields the length of the list, which is the number of elements in the list.
*<code><nowiki>Length[ <Text> ]</nowiki></code> yields the number of characters in the text.
+
*<code><nowiki>Length( <Text> )</nowiki></code> yields the number of characters in the text.
*<code><nowiki>Length[ <Locus> ]</nowiki></code> returns the number of points that the given locus is made up of. Use [[Perimeter Command|Perimeter]][Locus] to get the length of the locus itself. For details see the article about [[First Command]].
+
*<code><nowiki>Length( <Locus> )</nowiki></code> returns the number of points that the given locus is made up of. Use [[Perimeter Command|Perimeter]](Locus) to get the length of the locus itself. For details see the article about [[First Command]].
*<code><nowiki>Length[ <Arc> ]</nowiki></code> returns the ''arc length'' (i.e. just the length of the curved section) of an arc or sector.
+
*<code><nowiki>Length( <Arc> )</nowiki></code> returns the ''arc length'' (i.e. just the length of the curved section) of an arc or sector.
 
</div>}}
 
</div>}}
;Length[ <Function>, <Start x-Value>, <End x-Value> ]
+
;Length( <Function>, <Start x-Value>, <End x-Value> )
 
:Yields the length of the function graph in the given interval.
 
:Yields the length of the function graph in the given interval.
:{{example|1=<div><code><nowiki>Length[2x, 0, 1]</nowiki></code> returns  ''2.236067977'', about <math>\sqrt{5}</math>.</div>}}
+
:{{example|1=<code><nowiki>Length(2x, 0, 1)</nowiki></code> returns  ''2.236067977'', about <math>\sqrt{5}</math>.}}
;Length[ <Function>, <Start Point>, <End Point> ]
+
;Length( <Function>, <Start Point>, <End Point> )
 
:Yields the length of the function graph between the two points.
 
:Yields the length of the function graph between the two points.
 
:{{note| If the given points do not lie on the function graph, their x‐coordinates are used to determine the interval.}}
 
:{{note| If the given points do not lie on the function graph, their x‐coordinates are used to determine the interval.}}
;Length[ <Curve>, <Start t-Value>, <End t-Value> ]
+
;Length( <Curve>, <Start t-Value>, <End t-Value> )
 
:Yields the length of the curve between the two values '''of the parameter'''.
 
:Yields the length of the curve between the two values '''of the parameter'''.
;Length[ <Curve>, <Start Point>, <End Point> ]
+
;Length( <Curve>, <Start Point>, <End Point> )
 
:Yields the length of the curve between the two points that lie on the curve.
 
:Yields the length of the curve between the two points that lie on the curve.
  
 
==CAS Syntax==
 
==CAS Syntax==
;Length[ <Function>, <Start x-Value>, <End x-Value> ]
+
;Length( <Function>, <Start x-Value>, <End x-Value> )
 
:Calculates the length of a function graph between the two points.
 
:Calculates the length of a function graph between the two points.
:{{example|1=<div><code><nowiki>Length[2 x, 0, 1]</nowiki></code> yields <math>\sqrt{5}</math>.</div>}}
+
:{{example|1=<code><nowiki>Length(2 x, 0, 1)</nowiki></code> yields <math>\sqrt{5}</math>.}}
;Length[ <Function>, <Variable>, <Start x-Value>, <End x-Value> ]
+
;Length( <Function>, <Variable>, <Start x-Value>, <End x-Value> )
 
:Calculates the length of a function graph from ''Start Point'' to ''End Point''.
 
:Calculates the length of a function graph from ''Start Point'' to ''End Point''.
:{{example|1=<div><code><nowiki>Length[2 a, a,  0, 1]</nowiki></code> yields <math>\sqrt{5}</math>.</div>}}
+
:{{example|1=<code><nowiki>Length(2 a, a,  0, 1)</nowiki></code> yields <math>\sqrt{5}</math>.}}
  
{{note| 1=<div>See also [[File:Mode distance.svg|link=|22px]] [[Distance or Length Tool|Distance or Length]] tool.</div>}}
+
{{note| 1=See also [[File:Mode distance.svg|link=|22px]] [[Distance or Length Tool|Distance or Length]] tool.}}

Latest revision as of 09:25, 11 October 2017


Length( <Object> )
Yields the length of the object.
Examples:
  • Length( <Vector> ) yields the length of the vector.
  • Length( <Point> ) yields the length of the position vector of the given point.
  • Length( <List> ) yields the length of the list, which is the number of elements in the list.
  • Length( <Text> ) yields the number of characters in the text.
  • Length( <Locus> ) returns the number of points that the given locus is made up of. Use Perimeter(Locus) to get the length of the locus itself. For details see the article about First Command.
  • Length( <Arc> ) returns the arc length (i.e. just the length of the curved section) of an arc or sector.
Length( <Function>, <Start x-Value>, <End x-Value> )
Yields the length of the function graph in the given interval.
Example: Length(2x, 0, 1) returns 2.236067977, about \sqrt{5}.
Length( <Function>, <Start Point>, <End Point> )
Yields the length of the function graph between the two points.
Note: If the given points do not lie on the function graph, their x‐coordinates are used to determine the interval.
Length( <Curve>, <Start t-Value>, <End t-Value> )
Yields the length of the curve between the two values of the parameter.
Length( <Curve>, <Start Point>, <End Point> )
Yields the length of the curve between the two points that lie on the curve.

CAS Syntax

Length( <Function>, <Start x-Value>, <End x-Value> )
Calculates the length of a function graph between the two points.
Example: Length(2 x, 0, 1) yields \sqrt{5}.
Length( <Function>, <Variable>, <Start x-Value>, <End x-Value> )
Calculates the length of a function graph from Start Point to End Point.
Example: Length(2 a, a, 0, 1) yields \sqrt{5}.


Note: See also Mode distance.svg Distance or Length tool.
© 2024 International GeoGebra Institute