Julia 接受?sin命令行以显示帮助文本。我相信这样的帮助文本是作为文档字符串实现的。我想在运行时从我的 Julia 程序打印这样的文档字符串。怎么做?
julia> @doc sin\n sin(x)\n\n Compute sine of x, where x is in radians.\n\n sin(A::AbstractMatrix)\n\n Compute the matrix sine of a square matrix A.\n\n If A is symmetric or Hermitian, its eigendecomposition (eigen) is used to compute the\n sine. Otherwise, the sine is determined by calling exp.\n\n Examples\n \xe2\x89\xa1\xe2\x89\xa1\xe2\x89\xa1\xe2\x89\xa1\xe2\x89\xa1\xe2\x89\xa1\xe2\x89\xa1\xe2\x89\xa1\xe2\x89\xa1\xe2\x89\xa1\n\n julia> sin(fill(1.0, (2,2)))\n 2\xc3\x972 Matrix{Float64}:\n 0.454649 0.454649\n 0.454649 0.454649\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
323 次 |
| 最近记录: |