查看“︁Template:函數圖形/doc”︁的源代码
←
Template:函數圖形/doc
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{NoteTA |1 = zh-cn:示例; zh-tw:範例; |2 = zh-cn:重定向; zh-tw:重新導向; |3 = zh:函數圖形;zh-hans:函数图形; zh-tw:函數圖形; |G1=MediaWiki |G2=math |G3=IT }} <noinclude>-{T|zh:Template:函數圖形/doc;zh-hans:模板:函数图形/doc; zh-tw:模板:函數圖形/doc;}-</noinclude> <includeonly>-{T|zh:Template:函數圖形;zh-hans:模板:函数图形; zh-tw:模板:函數圖形;}-</includeonly> {{Documentation subpage}}<!-- 在本行下編輯模板說明 --> {{lua|Module:Complex Number/Calculate|Module:FunctionGraph}} == 概要 == == 參數及使用方法 == ===數學式格式=== {{see also|Template:複變運算#語法}} {{HideH|詳細運算符、常數及函<span></span>數列表}} ====語法==== {{複變運算/語法 |constantJson={ "x":{ "othername":[], "name":"函<span></span>數變數", "description":"函<span></span>數的變數", "value":"x", "title":"函數" } } |constantExt=x }} {{HideF}} === 參數方程 === 函數圖形可以繪製[[參數方程]],其需給定x值、y值和參數。這些值之間以分號<code>;</code>分隔,語法為: :<code>x值; y值; 參數; 參數起始值; 參數終止值</code> 若遇表達需需要宣告函數使用到分號,則[[參數方程]]之參數定義的分號則改為以帶有跳脫字符的分號<code>\;</code>分隔,語法為: :<code>x值\; y值\; 參數\; 參數起始值\; 參數終止值</code> 需要特別注意的是「參數起始值」和「參數終止值」只能填寫數字,不能填寫運算式;「參數」只能填寫參數變數名稱,也不能填寫運算式。能填寫運算式的部分僅有「x值」和「y值」。 以圓形參數方程為例: :<math>\begin{cases}x = r \cos t \\ y = r \sin t \end{cases}</math> 則參數方程在本模板中的表達與法為(t從0到6.28): :<code>cos(t); sin(t); t; 0; 6.28</code> {| |{{函數圖形|start=-1.5|end=1.5|sampling=200|width=200|height=200|min=-1.5|max=1.5 |cos(t);sin(t);t;0;6.28|caption=<code>cos(t); sin(t); t; 0; 6.28</code>的結果}} |} == 範例 == 單一函數圖形: :<code><nowiki>{{函數圖形| </nowiki>{{新增條文|sin(x)/x}}<nowiki> |start=-20|end=20|sampling=200|height=200|caption=sinc函數}}</nowiki></code> {| |{{函數圖形|sin(x)/x|start=-20|end=20|sampling=200|height=200|min=-50|max=50|caption=sinc函數}} |} 多個函數圖形: :<code><nowiki>{{函數圖形| </nowiki>{{新增條文|sin(x)/x}}<nowiki>| </nowiki>{{新增條文|cos(x)}}<nowiki> |start=-20|end=20|sampling=200|height=200|caption=sinc和cos函數}}</nowiki></code> {| |{{函數圖形|sin(x)/x|cos(x)|start=-20|end=20|sampling=200|height=200|min=-50|max=50|caption=sinc和cos函數}} |} 單一參數式: :<math>\begin{cases}x = 3\cos t+2\cos\left(1.5t\right) \\ y = 3\sin t-2\sin\left(1.5t\right) \end{cases}, 0\leq t\leq 4\pi</math> :<code><nowiki>{{函數圖形| </nowiki>{{新增條文|3*cos(t)+2*cos(1.5*t);3*sin(t)-2*sin(1.5*t);t;0;12.56}}<nowiki> |start=-20|end=20|sampling=200|height=200|caption=五角星}}</nowiki></code> {| |{{函數圖形| 3*cos(t)+2*cos(1.5*t);3*sin(t)-2*sin(1.5*t);t;0;12.56 |start=-20|end=20|sampling=200|height=200|caption=五角星}} |} == 技術限制 == ;無法呈現有斷點的函<span></span>數 目前有斷點的函<span></span>數會自動相連,故可能難以呈現有斷點的函<span></span>數 {| |{{函數圖形|title=數的負二次冪<math>x^{-2}</math>示意圖|start=-2|end=2|sampling=500|width=200|height=100|number class=複數 |range(x^(-2),0,13) |colors=#0000FF |1 name=x^(-2)| |caption=一個可以代表數的負二次冪<math>x^{-2}</math>的[[函数图形|函-{}-數圖形]]。數的負二次冪亦可以用平方倒數來表示,即<math>x^{-2}=\frac{1}{x^2}</math>}} |} 暫時的解決方法是設定多個相同顏色的函<span></span>數,透過range(x)來將每個函數設定為其中一段,例如<math>x^{-2}</math>則使用<code>range(x,-3,-0.25)^(-2)</code>與<code>range(x,0.25,3)^(-2)</code>兩個函<span></span>數來表達其兩個段,並將它們都設為相同顏色,以表示<math>x^{-2}</math>這個在0有[[奇点_(数学)|奇點]]的函<span></span>數。 {| |{{函數圖形|title=數的負二次冪<math>x^{-2}</math>示意圖|start=-2|end=2|sampling=100|width=200|height=100|number class=複數 |range(x,-3,-0.25)^(-2)|range(x,0.25,3)^(-2) |colors=#0000FF,#0000FF |1 name=x^(-2)|2 name=1/(x^2) |caption=一個可以代表數的負二次冪<math>x^{-2}</math>的[[函数图形|函-{}-數圖形]]。數的負二次冪亦可以用平方倒數來表示,即<math>x^{-2}=\frac{1}{x^2}</math>}} |} ;參數式無法多重呈現 普通的函數可以一次展示多個函數,但參數式因技術限制而無法達成。 {| | :<code><nowiki>{{函數圖形</nowiki></code> :<code><nowiki>|</nowiki>{{新增條文|3*cos(t)+2*cos(1.5*t);3*sin(t)-2*sin(1.5*t);t;0;12.56 }} </code> :<code><nowiki>|start=-20|end=20|sampling=200|height=200|caption=星狀線}}</nowiki></code> | :<code><nowiki>{{函數圖形</nowiki></code> :<code><nowiki>|</nowiki>{{新增條文|t*cos(t); t*sin(t); t; 0; 12.56}} </code> :<code><nowiki>|start=-20|end=20|sampling=200|height=200|caption=螺線}}</nowiki></code> | :<code><nowiki>{{函數圖形</nowiki></code> :<code><nowiki>|</nowiki>{{新增條文|3*cos(t)+2*cos(1.5*t);3*sin(t)-2*sin(1.5*t);t;0;12.56}} </code> :<code><nowiki>|</nowiki>{{新增條文|t*cos(t); t*sin(t); t; 0; 12.56}} </code> :<code><nowiki>|start=-20|end=20|sampling=200|height=200|caption=同時顯示出錯}}</nowiki></code> |- |{{函數圖形| 3*cos(t)+2*cos(1.5*t);3*sin(t)-2*sin(1.5*t);t;0;12.56 | start=-20|end=20|sampling=200|height=200|caption=星狀線}} |{{函數圖形| t*cos(t); t*sin(t); t; 0; 12.56 | start=-20|end=20|sampling=200|height=200|caption=螺線}} |{{函數圖形| 3*cos(t)+2*cos(1.5*t);3*sin(t)-2*sin(1.5*t);t;0;12.56 | t*cos(t); t*sin(t); t; 0; 12.56 | start=-20|end=20|sampling=200|height=200|caption=同時顯示出錯}} |- | :<code><nowiki>{{函數圖形</nowiki></code> :<code><nowiki>|</nowiki>{{新增條文|t*cos(t); t*sin(t); t; 0; 12.56}} </code> :<code><nowiki>|start=-20|end=20|sampling=200|height=200|caption=螺線}}</nowiki></code> | :<code><nowiki>{{函數圖形</nowiki></code> :<code><nowiki>|</nowiki>{{新增條文|sin(x)}} </code> :<code><nowiki>|start=-20|end=20|sampling=200|height=200|caption=[[正弦曲線]]}}</nowiki></code> | :<code><nowiki>{{函數圖形</nowiki></code> :<code><nowiki>|</nowiki>{{新增條文|t*cos(t); t*sin(t); t; 0; 12.56}} </code> :<code><nowiki>|</nowiki>{{新增條文|sin(x)}} </code> :<code><nowiki>|start=-20|end=20|sampling=200|height=200|caption=同時顯示出錯}}</nowiki></code> |- |{{函數圖形| t*cos(t); t*sin(t); t; 0; 12.56 | start=-20|end=20|sampling=200|height=200|caption=螺線}} |{{函數圖形| sin(x) | start=-20|end=20|sampling=200|height=200|caption=[[正弦曲線]]}} |{{函數圖形| t*cos(t); t*sin(t); t; 0; 12.56 | sin(x) | start=-20|end=20|sampling=200|height=200|caption=同時顯示出錯}} |} == 重定向 == == 注意事项 == == 模板编辑说明 == == 參見 == ==TemplateData== {{TemplateDataHeader}} <templatedata> { "params": { "1": { "label": "函數1", "description": "函數1的數學表達式,預設以x為變數", "example": "2*x^3-3*x+1", "type": "string", "default": "f(x)=x", "autovalue": "x", "required": true }, "2": { "label": "函數2", "description": "函數2的數學表達式,預設以x為變數", "type": "string", "autovalue": "x" }, "3": { "label": "函數3", "description": "函數3的數學表達式,預設以x為變數", "type": "string", "autovalue": "x" }, "4": { "label": "函數4", "description": "函數4的數學表達式,預設以x為變數", "type": "string", "autovalue": "x" }, "5": { "label": "函數5", "description": "函數5的數學表達式,預設以x為變數。可依序添加", "type": "string", "autovalue": "x" }, "6": { "label": "函數6", "description": "函數6的數學表達式,預設以x為變數。可依序添加", "type": "string", "autovalue": "x" }, "7": { "label": "函數7", "description": "函數7的數學表達式,預設以x為變數。可依序添加", "type": "string", "autovalue": "x" }, "8": { "label": "函數8", "description": "函數8的數學表達式,預設以x為變數。可依序添加", "type": "string", "autovalue": "x" }, "1 name": { "label": "函數1名稱", "description": "函數1的顯示名稱", "type": "string", "autovalue": "" }, "2 name": { "label": "函數2名稱", "description": "函數2的顯示名稱", "type": "string", "autovalue": "" }, "3 name": { "label": "函數3名稱", "description": "函數3的顯示名稱", "type": "string", "autovalue": "" }, "4 name": { "label": "函數4名稱", "description": "函數4的顯示名稱", "type": "string", "autovalue": "" }, "5 name": { "label": "函數5名稱", "description": "函數5的顯示名稱。可依序添加", "type": "string", "autovalue": "" }, "6 name": { "label": "函數6名稱", "description": "函數6的顯示名稱。可依序添加", "type": "string", "autovalue": "" }, "7 name": { "label": "函數7名稱", "description": "函數7的顯示名稱。可依序添加", "type": "string", "autovalue": "" }, "8 name": { "label": "函數8名稱", "description": "函數8的顯示名稱。可依序添加", "type": "string", "autovalue": "" }, "title": { "label": "標題", "description": "函數圖形的標題", "example": "x的函數", "type": "content" }, "width": { "label": "寬度", "description": "函數圖形的寬度", "type": "number", "autovalue": "200" }, "height": { "label": "高度", "description": "函數圖形的高度", "type": "number", "autovalue": "100" }, "number class": { "label": "數字種類", "description": "要運算的數字模式,可以是實數、cmath(複數)、qmath(四元數)、no calc(不計算)、mathtag(以<math>輸出)或直接寫Module:模組名稱.運算庫來指定使用特定模組來運算。", "example": "四元數、複數或實數", "type": "string", "default": "實數", "autovalue": "", "suggestedvalues": [ "real", "cmath", "qmath", "no calc", "mathtag", "實數", "複數", "四元數" ] }, "nonreal is nan": { "label": "視非純實數為NaN", "description": "將複數中,虛部不為零的值視為NaN", "type": "boolean", "default": "no" }, "round number": { "label": "取整位數", "type": "number" }, "outer width": { "label": "外部寬度", "type": "number" }, "align": { "label": "對齊方式", "type": "string" }, "inner height": { "label": "內部寬度", "type": "number" }, "start": { "label": "起始值", "description": "繪製函數的變數從這個值開始代入", "type": "number", "required": true }, "end": { "label": "結束值", "description": "繪製函數的變數的結束值", "type": "number", "required": true }, "sampling": { "label": "取樣數", "description": "繪製函數的取樣點數", "type": "number", "autovalue": "100", "required": true }, "min": { "label": "最小值", "description": "y軸最小值", "type": "number" }, "max": { "label": "最大值", "description": "y軸最大值", "type": "number" }, "caption": { "label": "說明文字", "type": "content" }, "frame": { "label": "是否加外框", "description": "如果為真,輸出的函數圖形會有一般圖像的外框", "type": "boolean", "default": "true" }, "colors": { "label": "函數的顏色", "description": "每個函數圖形的顏色,以逗點分隔。", "type": "string" }, "calc diff 1": { "label": "函數1以微分結果表示", "type": "boolean", "description": "函數1繪製的函數圖形是否為函數1表達式經過微分的結果" }, "calc diff 2": { "label": "函數2以微分結果表示", "type": "boolean", "description": "函數2繪製的函數圖形是否為函數2表達式經過微分的結果" }, "calc diff 3": { "label": "函數3以微分結果表示", "type": "boolean", "description": "函數3繪製的函數圖形是否為函數3表達式經過微分的結果" }, "calc diff 4": { "label": "函數4以微分結果表示", "type": "boolean", "description": "函數4繪製的函數圖形是否為函數4表達式經過微分的結果" }, "calc diff 5": { "label": "函數5以微分結果表示", "type": "boolean", "description": "函數5繪製的函數圖形是否為函數5表達式經過微分的結果" }, "calc diff 6": { "label": "函數6以微分結果表示", "type": "boolean", "description": "函數6繪製的函數圖形是否為函數6表達式經過微分的結果" }, "calc diff 7": { "label": "函數7以微分結果表示", "type": "boolean", "description": "函數7繪製的函數圖形是否為函數7表達式經過微分的結果" }, "calc diff 8": { "label": "函數8以微分結果表示", "type": "boolean", "description": "函數8繪製的函數圖形是否為函數8表達式經過微分的結果" }, "useOtherModule": { "label": "是否可呼叫其他模組", "description": "是否可呼叫其他模組的函數。", "type": "boolean", "default": "no" }, "interpolate": { "label": "內插模式", "type": "string", "default": "monotone" } }, "paramOrder": [ "1", "1 name", "2", "2 name", "3", "3 name", "4", "4 name", "5", "5 name", "6", "6 name", "7", "7 name", "8", "8 name", "title", "width", "height", "number class", "useOtherModule", "nonreal is nan", "round number", "outer width", "align", "inner height", "start", "end", "sampling", "interpolate", "min", "max", "caption", "frame", "colors", "calc diff 1", "calc diff 2", "calc diff 3", "calc diff 4", "calc diff 5", "calc diff 6", "calc diff 7", "calc diff 8" ], "description": "繪製一個函數圖形", "format": "block" } </templatedata> <includeonly>{{sandbox other|| <!-- 本行下加入模板的分類,跨維基連結加入Wikidata(參見[[Wikipedia:维基数据]]) --> [[Category:數學模板]] }}</includeonly>
该页面使用的模板:
Template:Documentation subpage
(
查看源代码
)
Template:HideF
(
查看源代码
)
Template:HideH
(
查看源代码
)
Template:Lua
(
查看源代码
)
Template:NoteTA
(
查看源代码
)
Template:See also
(
查看源代码
)
Template:TemplateDataHeader
(
查看源代码
)
Template:函數圖形
(
查看源代码
)
Template:新增條文
(
查看源代码
)
Template:複變運算/語法
(
查看源代码
)
返回
Template:函數圖形/doc
。
导航菜单
个人工具
登录
命名空间
模板
讨论
不转换
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
工具
链入页面
相关更改
页面信息