And I also got the loop bounds wrong it should be 2:len, not 1:len-1 as 
shown, here is the corrected code:

function lowpass(input::Float64, lp::Float64, g::Float64)
    hp::Float64 = input - lp
    lp += g * hp
    [lp, hp]
end
function parametricarray2D(f, time::Vector{Float64})
    len = length(time)
    ret = f(time[1])
    output = Array(Float64, len, length(ret))
    output[1,:] = ret
    for i in 2:len
        output[i,:] = f(time[i])
    end
    output
end
s = 0.0;
data = parametricarray2D(t->begin input=sin(100.0*t); [t, input, 
lowpass(input, s, 0.5)] end, linspace(0.0,2.0pi,2*44100))




Reply via email to