Deconvolution/2D+: Difference between revisions
m
→{{header|Perl}}: a few simplifications
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: oops, need 'say' for output) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: a few simplifications) |
||
Line 859:
my @dg = shape(@g);
my @hsize;
push @hsize,
my @toSolve = map { [row(\@g, \@f, \@hsize, $_)] } coords(shape(@g));
rref( \@toSolve );
my @h;
my $n = 0;
for (coords(@hsize)) {
my($
$
}
@
}
Line 886 ⟶ 880:
my @row;
my @fdim = shape(@f);
for (coords(@hsize)) {
my @hc = reverse split ' ', $_;
Line 997 ⟶ 990:
]
);
my $d = scalar shape(@g);▼
print "${d}D array:\n";▼
print "h =\n";▼
print "\nff =\n";▼
my @h = deconvolve_N( \@g, \@f );
my @ff = deconvolve_N( \@g, \@h );
▲my $d = scalar shape(@g);
▲print "h =\n";
pretty_print(0,@h);
▲print "\nff =\n";
pretty_print(0,@ff);</lang>
{{out}}
<pre>3D
h =
[
|