zoukankan      html  css  js  c++  java
  • lua

    documentclass[border=5]{standalone} 
    usepackage{tikz}
    directlua{ function coth (i)%定义双曲正切
    return math.cosh(i) / math.sinh(i) end function brillouin (J, x) if x == 0 then return 0 else return (2*J+1)/(2*J)*coth((2*J+1)/(2*J)*x) - 1/(2*J)*coth(1/(2*J)*x) end end } pgfmathdeclarefunction{Brillouin}{2}{% edefpgfmathresult{% directlua{tex.print("" .. brillouin(#1,#2))}% }% } egin{document} egin{tikzpicture}[x=2cm/10] draw [help lines] (-5,0) -- (10,0); draw [help lines, -stealth] (0,-1) -- (0,1.5); draw [densely dotted] (0,{ Brillouin(1, 100)} ) -- ++(10,0); draw [red] plot [domain=-5:10, samples=100] (x, { Brillouin(1, x)}); draw [green] plot [domain=-5:10, samples=100] (x, { Brillouin(5, x)}); draw [blue] plot [domain=-5:10, samples=100] (x, { Brillouin(50, x)}); end{tikzpicture} end{document}
  • 相关阅读:
    20200301(4)
    网络工程横道图
    20200229追根溯源(3)
    20200229(2)
    追根溯源 (1)
    20200228 down(0)
    20200228
    7-7 古风排版 (20分)
    不写了天梯赛 屁股疼死了
    字符串翻转(面试题2)
  • 原文地址:https://www.cnblogs.com/wangshixi12/p/4134021.html
Copyright © 2011-2022 走看看