From 73bb8e12238e506a3ff187b3a2b948c85bc11aeb Mon Sep 17 00:00:00 2001 From: Matthew Fishman Date: Thu, 26 Aug 2021 15:35:43 -0400 Subject: [PATCH] Fix some deprecations in FIR design example --- examples/FIR_design.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/FIR_design.jl b/examples/FIR_design.jl index 0b1185bb..05abe06b 100644 --- a/examples/FIR_design.jl +++ b/examples/FIR_design.jl @@ -36,7 +36,7 @@ using Gadfly, DSP function FIRfreqz(b::Array, w = range(0, stop=π, length=1024)) n = length(w) - h = Array{ComplexF32}(n) + h = Array{ComplexF32}(undef, n) sw = 0 for i = 1:n for j = 1:length(b) @@ -68,7 +68,7 @@ h = FIRfreqz(f, w) #' The next code chunk is executed in term mode, see the [script](FIR_design.jl) for syntax. #+ term=true -h_db = log10(abs.(h)); +h_db = log10.(abs.(h)); ws = w/pi*(fs/2) #+ @@ -78,6 +78,6 @@ plot(y = h_db, x = ws, Geom.line, #' And again with default options -h_phase = unwrap(-atan(imag(h),real(h))) +h_phase = unwrap(-atan.(imag(h),real(h))) plot(y = h_phase, x = ws, Geom.line, Guide.xlabel("Frequency (Hz)"), Guide.ylabel("Phase (radians)"))