Start GeoGebra
Create Activity
Create Book
Upload…
Create Group
Join Group
Resources
Downloads
Blog
Help
Sign in
搜索
页面
讨论
查看源代码
历史
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
台灣正體
Create language links
链入页面
相关更改
上传文件
特殊页面
查看“Function 指令”的源代码
←
Function 指令
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
不允许您执行您所请求的操作。
您可以查看和复制此页面的源代码。
<noinclude>{{Manual Page|version=4.0}}</noinclude>{{command|function|Function}} ; Function[函數 f, 數值 a, 數值 b] : 此指令會產生跟 f(x) 函數一模一樣的函數,唯一不同的是它的函數圖形只介於 a 與 b 之間。 {{example|畫出 f(x) 介於 -5 與 5 之間的函數圖形。}} <code> f(x) = x^2 + x + 1<br/> g(x) = Function[f, -5, 5]</code> {{Note|1=<div> * 此例中的 g(x) 與 f(x) 唯一的不同就在於它的「函數圖形只介於 -5 與 5 之間」,其他的功能則完全一樣!比方說你可以計算 g(8) 或 g(-10) ,雖然 8 和 -10 都不在指定的範圍內。<br/><br/> * 如果真的要限制函數的變數範圍的話,必須使用 [[If 指令]],用法如下:<br/><code>g(x) = If[-5 < x && x < 5, x^2 + x + 1]</code><br/>這時如果輸入:<code>g(8)</code>,那麼就會出現 <code>g(8) = 未定義</code> 的訊息。<br/><br/> * 反過來說,如果我們有: <br/><code>f(x) = Function[x^2, -1, 1]</code> ,<br/>雖然這會限制函數圖形的範圍,這時如果我們輸入:<br/> <code>g(x) = 2 f(x)</code> ,<br/>那麼 g(x) 的函數圖形並不會限制於 -1 與 1 之間喔! </div>}} {{example|將函數當作另一個自製工具的「參數」或「引數」。}} 假設我們自己製作的一個工具,叫做 Curve2D,它的語法如下:<br/> <code>Curve2D[函數 f, 函數 g, 數值 a, 數值 b]</code> 這時我們可以使用以下的用法:<br/> <code>f(x) = 1<br/>g(x) = sin(x)<br/>Curve2D[f, g, 0, 2]</code> 我們也可以直接利用 Function 指令達到相同的效果:<br/> <code>Curve2D[Function[1, -1, 1], sin(x), 0, 2]</code> {{note|1= * 上面的例子不能寫成 <code>Curve2D[1 , sin(x), 0, 2]</code>,因為 GeoGebra 不會知道第一個參數中的「1」是指一個「常數函數」。 * 雖然上面我們將 Function 指令的「繪圖範圍」設定在 -1 與 1 之間,但這個設定是無關緊要的。 }} <includeonly>{{EditorTools}}</includeonly> [[en:Manual:Function_Command]]
该页面使用的模板:
Template:Command
(
查看源代码
)
Template:Example
(
查看源代码
)
Template:Manual Page
(
查看源代码
)
Template:Note
(
查看源代码
)
返回至
Function 指令
。
GeoGebra
About
Team
Blog
Help
Tutorials
Forum
Manual
Partners
Partners
Institutes
Get Involved
Contact us
Feedback & Questions
This email address is being protected from spambots. You need JavaScript enabled to view it.
+43 677 6137 2693
Terms of Service
Privacy
License
© 2024 International GeoGebra Institute