Commit af0cb1b5 authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

test passing

parent 6481930b
Pipeline #662 failed with stage
in 4 minutes and 40 seconds
using LabProcesses, ControlSystems using LabProcesses, ControlSystems, DSP
using Base.Test using Test
# Reference generators # Reference generators
r = PRBSGenerator(Int(4)) r = PRBSGenerator(Int(4))
...@@ -8,14 +8,14 @@ seq = [r() for i = 1:10] ...@@ -8,14 +8,14 @@ seq = [r() for i = 1:10]
foreach(r,1:10_000) foreach(r,1:10_000)
function test_sysfilter() function test_sysfilter()
N = 10 N = 10
u = randn(N) u = randn(N)
b = [1, 1] b = [1, 1]
a = [1, 0.1, 1] a = [1, 0.1, 1]
sys = ss(tf(b,a,1)) sys = ss(tf(b,a,1))
state = init_sysfilter(sys) state = init_sysfilter(sys)
yf = filt(b,a,u) yf = filt(b,a,u)
yff = similar(yf) yff = similar(yf)
for i in eachindex(u) for i in eachindex(u)
yff[i] = sysfilter!(state, sys, u[i])[1] yff[i] = sysfilter!(state, sys, u[i])[1]
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment