“Sum 指令”的版本间的差异
来自GeoGebra Manual
小 (機器人:執行文字代換作業 (-{{command +{{command|cas=true)) |
|||
第1行: | 第1行: | ||
− | <noinclude>{{Manual Page|version= | + | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|statistics}} |
− | ;Sum | + | ;Sum( <List> ) |
− | :{{ | + | :Calculates the sum of all list elements. |
− | ;Sum | + | :{{examples|1=<div> |
− | :{{ | + | :* <code><nowiki>Sum({1, 2, 3})</nowiki></code> yields the number ''a = 6''. |
− | ==CAS | + | :* <code><nowiki>Sum({x^2, x^3})</nowiki></code> yields ''f(x) = x<sup>2</sup> + x<sup>3</sup>''. |
+ | :* <code><nowiki>Sum(Sequence(i, i, 1, 100))</nowiki></code> yields the number ''a = 5050''. | ||
+ | :* <code><nowiki>Sum({(1, 2), (2, 3)})</nowiki></code> yields the point ''A = (3, 5)''. | ||
+ | :* <code><nowiki>Sum({(1, 2), 3})</nowiki></code> yields the point ''B = (4, 5)''. | ||
+ | :* <code><nowiki>Sum({"a", "b", "c"})</nowiki></code> yields the text ''"abc"''.</div>}} | ||
+ | ;Sum( <List>, <Number of Elements> ) | ||
+ | :Calculates the sum of the first ''n'' list elements. | ||
+ | :{{example| 1=<div><code>Sum({1, 2, 3, 4, 5, 6}, 4)</code> yields the number ''a = 10''.</div>}} | ||
+ | ;Sum( <List>, <List of Frequencies> ) | ||
+ | :Returns the sum of given list of numbers considering the frequencies. | ||
+ | :{{example|1=<div><code><nowiki>Sum({1, 2, 3, 4, 5}, {3, 2, 4, 4, 1})</nowiki></code> yields ''a = 40''.</div>}} | ||
+ | {{note| 1=This command works for numbers, points, vectors, text, and functions.}} | ||
+ | ==CAS Syntax== | ||
+ | The following command only works in the [[File:Menu view cas.svg|link=|16px]] [[CAS View]]. | ||
− | ;Sum | + | ;Sum( <Expression>, <Variable>, <Start Value>, <End Value> ) |
− | :{{ | + | :Computes sum <math>\sum_{t=Start Value}^{End Value}f(t)</math>. End value might be infinity. |
+ | :{{examples|1=<div> | ||
+ | :* <code><nowiki>Sum(n^2, n, 1, 3)</nowiki></code> yields ''14''. | ||
+ | :* <code><nowiki>Sum(r^k, k, 0, n)</nowiki></code> yields ''<math>\frac{r^{n+1} }{r - 1} - \frac{1}{r - 1}</math>''. | ||
+ | :* <code><nowiki>Sum((1/3)^n, n, 0, Infinity)</nowiki></code> yields ''<math>\frac{3}{2}</math>''.</div>}} |
2021年7月27日 (二) 03:59的版本
本頁為官方文件,一般使用者無法修改,若有任何誤謬,請與官方聯絡。如欲編輯,請至本頁的開放版。
- Sum( <List> )
- Calculates the sum of all list elements.
- 範例:
Sum({1, 2, 3})
yields the number a = 6.Sum({x^2, x^3})
yields f(x) = x2 + x3.Sum(Sequence(i, i, 1, 100))
yields the number a = 5050.Sum({(1, 2), (2, 3)})
yields the point A = (3, 5).Sum({(1, 2), 3})
yields the point B = (4, 5).Sum({"a", "b", "c"})
yields the text "abc".
- Sum( <List>, <Number of Elements> )
- Calculates the sum of the first n list elements.
- 範例:
Sum({1, 2, 3, 4, 5, 6}, 4)
yields the number a = 10. - Sum( <List>, <List of Frequencies> )
- Returns the sum of given list of numbers considering the frequencies.
- 範例:
Sum({1, 2, 3, 4, 5}, {3, 2, 4, 4, 1})
yields a = 40.
備註: This command works for numbers, points, vectors, text, and functions.
CAS Syntax
The following command only works in the CAS View.
- Sum( <Expression>, <Variable>, <Start Value>, <End Value> )
- Computes sum \sum_{t=Start Value}^{End Value}f(t). End value might be infinity.
- 範例:
Sum(n^2, n, 1, 3)
yields 14.Sum(r^k, k, 0, n)
yields \frac{r^{n+1} }{r - 1} - \frac{1}{r - 1}.Sum((1/3)^n, n, 0, Infinity)
yields \frac{3}{2}.