Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Deconvolution-1D/11l/deconvolution-1d.11l
Normal file
16
Task/Deconvolution-1D/11l/deconvolution-1d.11l
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
F deconv(g, f)
|
||||
V result = [0]*(g.len - f.len + 1)
|
||||
L(&e) result
|
||||
V n = L.index
|
||||
e = g[n]
|
||||
V lower_bound = I n >= f.len {n - f.len + 1} E 0
|
||||
L(i) lower_bound .< n
|
||||
e -= result[i] * f[n - i]
|
||||
e /= f[0]
|
||||
R result
|
||||
|
||||
V h = [-8,-9,-3,-1,-6,7]
|
||||
V f = [-3,-6,-1,8,-6,3,-1,-9,-9,3,-2,5,2,-2,-7,-1]
|
||||
V g = [24,75,71,-34,3,22,-45,23,245,25,52,25,-67,-96,96,31,55,36,29,-43,-7]
|
||||
print(deconv(g, f))
|
||||
print(deconv(g, h))
|
||||
Loading…
Add table
Add a link
Reference in a new issue