在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:JuliaInterop/MathLink.jl开源软件地址:https://github.com/JuliaInterop/MathLink.jl开源编程语言:Julia 100.0%开源软件介绍:MathLink.jlThis package provides access to Mathematica/Wolfram Engine via the MathLink library, now renamed to Wolfram Symbolic Transfer Protocol (WSTP). InstallationThe package requires an installation of either Mathematica or the free Wolfram Engine. It will attempt to find the installation at build time; if this fails, you will need to set the following environment variables:
After setting you may need to manually build the package (@v1.X) pkg> build MathLink UsageThe main interface consists of the julia> using MathLink
julia> W"Sin"
W"Sin"
julia> sin1 = W"Sin"(1.0)
W"Sin"(1.0)
julia> sinx = W"Sin"(W"x")
W"Sin"(W"x") To parse an expression in the Wolfram Language, you can use the julia> W`Sin[1]`
W"Sin"(1)
julia> weval(sin1)
0.8414709848078965
julia> weval(sinx)
W"Sin"(W"x")
julia> weval(W"Integrate"(sinx, (W"x", 0, 1)))
W"Plus"(1, W"Times"(-1, W"Cos"(1))) Keyword arguments can be used to pass local variables julia> weval(sinx; x=2.0)
0.9092974268256817 Notes
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论