As a learning exercise, I am trying to code a simple FIR filter.
As a start, it has 2 fields and a constructor:
type FIR{in_t, coef_t}
in::Vector{in_t}
coef::Vector{coef_t}
FIR (in_::Vector{in_t}, coef_::Vector{coef_t}) = (x=new(); x.in =
zeros(in_t, size (in_)); x.coef = coef_;)
end
w = zeros (Float64, 10)
f = FIR{Float64,Float64}(w,w)
This code executes, but seems very confused:
julia> typeof(f)
Array{Float64,1}
Huh? I expected "f" to be of type FIR{Float64,Float64}. Clearly I'm doing
something very wrong.