NormFunction
更多信息
- NormFunction->f 指明 f[data] 在产生的结果中应该被最小化.
范例
打开所有单元 关闭所有单元基本范例 (2)
data = Table[Prime[x], {x, 20}]FindFit[data, a x Log[b + cx], {a, b, c}, x]FindFit[data, a x Log[b + cx], {a, b, c}, x, NormFunction -> (Norm[#, Infinity]&)]FindFit[data, a x Log[b + cx], {a, b, c}, x, NormFunction -> (Norm[#, 1]&)]sol2 = First[x /. NDSolve[{x''[t] + x[t] == 0, x[0] == 1, x'[0] == 0}, x, {t, 0, 100π}, NormFunction -> (Norm[#, 2]&)]]soli = First[x /. NDSolve[{x''[t] + x[t] == 0, x[0] == 1, x'[0] == 0}, x, {t, 0, 100π}, NormFunction -> (Norm[#, ∞]&)]]{sol2[100π], soli[100π]} - 1范围 (1)
sol[p_] := NDSolve[{D[u[t, x], t, t] == D[u[t, x], x, x], u[0, x] == Exp[-x ^ 2], Derivative[1, 0][u][0, x] == -Exp[-x ^ 2], u[t, -L] == u[t, L]}, u, {t, 0, 4L}, {x, -L, L}, NormFunction -> (Norm[#, p]&)]L = 10;Table[
Plot[Evaluate[(u[40, x] /. sol[p]) - (Exp[-x ^ 2] - 2Sqrt[π])], {x, -L, L}, PlotRange -> All], {p, {1, 2, 3, ∞}}]//QuietPlot3D[Evaluate[u[t, x] /. sol[1]], {t, 0, 40}, {x, -10, 10}, Mesh -> False, PlotPoints -> 20]历史
2003年引入 (5.0)
文本
Wolfram Research (2003),NormFunction,Wolfram 语言函数,https://reference.wolfram.com/language/ref/NormFunction.html.
CMS
Wolfram 语言. 2003. "NormFunction." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/NormFunction.html.
APA
Wolfram 语言. (2003). NormFunction. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/NormFunction.html 年
BibTeX
@misc{reference.wolfram_2026_normfunction, author="Wolfram Research", title="{NormFunction}", year="2003", howpublished="\url{https://reference.wolfram.com/language/ref/NormFunction.html}", note=[Accessed: 02-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_normfunction, organization={Wolfram Research}, title={NormFunction}, year={2003}, url={https://reference.wolfram.com/language/ref/NormFunction.html}, note=[Accessed: 02-November-2026]}