Difference between revisions of "DataFunction Command"

From GeoGebra Manual
Jump to: navigation, search
(pretty "link")
m (spacing)
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|function}}
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|function}}
 
;DataFunction[ &lt;List of Numbers>, &lt;List of Numbers> ]
 
;DataFunction[ &lt;List of Numbers>, &lt;List of Numbers> ]
: Yields a function that connects points (x<sub>1</sub>,y<sub>1</sub>), (x<sub>2</sub>,y<sub>2</sub>),...,(x<sub>n</sub>,y<sub>n</sub>) where
+
: Yields a function that connects points (x<sub>1</sub>, y<sub>1</sub>), (x<sub>2</sub>, y<sub>2</sub>),...,(x<sub>n</sub>, y<sub>n</sub>) where {x<sub>1</sub>, ..., x<sub>n</sub>}, {y<sub>1</sub>, ..., y<sub>n</sub>} are the input lists. In between these point linear interpolation is used. This command is used by [[Views#Other Display Features|Sensors]].
{x<sub>1</sub>, ...,x<sub>n</sub>}, {y<sub>1</sub>, ...,y<sub>n</sub>} are the input lists. In between these point linear interpolation is used. This command is used by [[Views#Other Display Features|Sensors]].
 
 
:{{example|1= <div>
 
:{{example|1= <div>
:*<code>DataFunction[{0, 1, 2, 4}, {0, 1, 4, 16}]</code> yields a function that goes through points (0,0), (1,1), (2,4), (4,16).</div>}}
+
:*<code>DataFunction[{0, 1, 2, 4}, {0, 1, 4, 16}]</code> yields a function that goes through points (0, 0), (1,1), (2, 4), (4, 16).</div>}}

Revision as of 08:14, 11 September 2015


DataFunction[ <List of Numbers>, <List of Numbers> ]
Yields a function that connects points (x1, y1), (x2, y2),...,(xn, yn) where {x1, ..., xn}, {y1, ..., yn} are the input lists. In between these point linear interpolation is used. This command is used by Sensors.
Example:
  • DataFunction[{0, 1, 2, 4}, {0, 1, 4, 16}] yields a function that goes through points (0, 0), (1,1), (2, 4), (4, 16).
© 2024 International GeoGebra Institute