apr-6ren">
gpt4 book ai didi

octave - Julia 中是否有等效于 Octave 的 "lookfor"命令?

转载 作者:行者123 更新时间:2023-12-01 23:13:56 24 4
gpt4 key购买 nike

如何在 Julia 中寻找一个具体的函数? lookfor 会在 Matlab/GNU Octave 中实现,这里怎么做?

最佳答案

lookfor 的等价物是 apropos:

julia> apropos("fourier transform")
Base.DFT.fft

julia> apropos("concatenate")
Base.:*
Base.hcat
Base.cat
Base.flatten
Base.mapslices
Base.vcat
Base.hvcat
Base.SparseArrays.blkdiag
Core.@doc

其他有用的函数,取决于您要查找的内容,包括 methodswith,它可以为您提供为特定参数类型指定的方法列表:

julia> methodswith(Regex)
25-element Array{Method,1}:
==(a::Regex, b::Regex) at regex.jl:370
apropos(io::IO, needle::Regex) at docs/utils.jl:397
eachmatch(re::Regex, str::AbstractString) at regex.jl:365
eachmatch(re::Regex, str::AbstractString, ovr::Bool) at regex.jl:362
...

关于octave - Julia 中是否有等效于 Octave 的 "lookfor"命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39650133/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com