include("./signalGenerator.jl")
include("./AdwinNaive.jl")

using SignalGenerator

function gen_data()
    N = 1000
    m=5
    dat = zeros(m,N)
    cdes = zeros(m,N)
    for i=1:m
        dat[i,:] = genSig(n=N, mu=100, changeStep=2.0, sigStd=0.5)["sig"]
        y=scale01(dat[i,:])
        r=adwin_naive(y, min_len=20, ecut_custom=0.2)
        chps=extractChps(r)
        cdes[i,1:length(chps)] = chps
    end 
    writedlm("./dat/input.txt", dat', ',')
    writedlm("./dat/chps.txt", cdes', ',')
end
gen_data()
