RosettaCodeData/Task/Deconvolution-1D/Common-Lisp/deconvolution-1d-2.lisp

30 lines
689 B
Common Lisp

(setf f #2A((-3 -6 -1 8 -6 3 -1 -9 -9 3 -2 5 2 -2 -7 -1)))
(setf h #2A((-8 -9 -3 -1 -6 7)))
(setf g #2A((24 75 71 -34 3 22 -45 23 245 25 52 25 -67 -96 96 31 55 36 29 -43 -7)))
(deconv g f)
#2A((-8.0)
(-9.000000000000002)
(-2.999999999999999)
(-0.9999999999999997)
(-6.0)
(7.000000000000002))
(deconv g h)
#2A((-2.999999999999999)
(-6.000000000000001)
(-1.0000000000000002)
(8.0)
(-5.999999999999999)
(3.0000000000000004)
(-1.0000000000000004)
(-9.000000000000002)
(-9.0)
(2.9999999999999996)
(-1.9999999999999991)
(5.0)
(1.9999999999999996)
(-2.0000000000000004)
(-7.000000000000001)
(-0.9999999999999994))