Data update

This commit is contained in:
Ingy döt Net 2024-10-16 18:07:41 -07:00
parent 81fd053722
commit 52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions

View file

@ -0,0 +1,19 @@
func[] deconv g[] f[] .
len h[] len g[] - len f[] + 1
for n = 1 to len h[]
h[n] = g[n]
low = higher 1 (n - len f[] + 1)
for i = low to n - 1
h[n] -= h[i] * f[n - i + 1]
.
h[n] /= f[1]
.
return h[]
.
h[] = [ -8 -9 -3 -1 -6 7 ]
f[] = [ -3 -6 -1 8 -6 3 -1 -9 -9 3 -2 5 2 -2 -7 -1 ]
g[] = [ 24 75 71 -34 3 22 -45 23 245 25 52 25 -67 -96 96 31 55 36 29 -43 -7 ]
print h[]
print deconv g[] f[]
print f[]
print deconv g[] h[]

View file

@ -0,0 +1,26 @@
##
function deconv(g, f: array of real): array of real;
begin
var h: array of real;
setlength(h, g.length - f.length + 1);
for var n := 0 to h.length - 1 do
begin
h[n] := g[n];
var lower: integer;
if n >= f.length then
lower := n - f.length + 1;
for var i := lower to n - 1 do
h[n] -= h[i] * f[n - i];
h[n] /= f[0];
end;
result := h;
end;
var h := |-8.0, -9, -3, -1, -6, 7|;
var f := |-3.0, -6, -1, 8, -6, 3, -1, -9, -9, 3, -2, 5, 2, -2, -7, -1|;
var g := |24.0, 75, 71, -34, 3, 22, -45, 23, 245, 25, 52, 25, -67, -96,
96, 31, 55, 36, 29, -43, -7|;
h.Println;
deconv(g, f).Println;
f.Println;
deconv(g, h).Println;