Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何访问Julia 1.0.0中的conv函数_Julia - Fatal编程技术网

如何访问Julia 1.0.0中的conv函数

如何访问Julia 1.0.0中的conv函数,julia,Julia,stackoverflow问题使用Julia 0.6.1,如下所示: The convolution function in Julia has the following behaviour: _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_) | Documentation: https://docs.julialang.org

stackoverflow问题使用Julia 0.6.1,如下所示:

The convolution function in Julia has the following behaviour:

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.1 (2017-10-24 22:15 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-pc-linux-gnu

julia> conv([1,2,NaN],[1])

3-element Array{Float64,1}:
 NaN
 NaN
 NaN
Julia 1.0.0中的相同内容会产生以下错误输出:

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.0 (2018-08-08)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> conv([1,2,NaN],[1])
ERROR: UndefVarError: conv not defined
Stacktrace:
 [1] top-level scope at none:0

如何访问Julia 1.0.0中的
conv
函数?

卷积函数已移动到代表数字信号处理的软件包中

当尝试将v0.7之前的代码移植到Julia v1.0时,通常建议使用Julia v0.7。事实上,这是v0.7存在的唯一原因

在v0.7中调用
conv
时,您将获得所需的所有信息:

julia> conv(rand(10))
ERROR: conv has been moved to the package DSP.jl.
Run `Pkg.add("DSP")` to install it, restart Julia,
and then run `using DSP` to load it.
如果您不想在您的机器上运行v0.7,只是为了找出某些东西被移动到了哪里,您还可以在中搜索旧函数的名称。搜索
conv
我们发现:

for f in [:conv, :conv2, :deconv, :filt, :filt!, :xcorr]
    @eval Base.@deprecate_moved $f "DSP"
end

虽然是源代码,但我相信
@deprecate\u移动的“DSP”
是可以理解的。

当我尝试添加DSP包时,我得到了:(v1.0)pkg>在
C:\Users\Jim\.julia\registries\General添加dsp更新注册表
更新git repo
https://github.com/JuliaRegistries/General.git
错误:无法解析以下程序包名称:*dsp(在项目、清单或注册表中找不到)请按已知的
name=uuid
指定。抱歉,以上内容难以阅读。也许我应该提出一个问题?这是DSP而不是DSP的信息,还有一个包,它是更快的短滤波器。