Deming's funnel: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) (Added Perl example) |
SqrtNegInf (talk | contribs) (Added Perl example) |
||
Line 677: | Line 677: | ||
=={{header|Perl}}== |
=={{header|Perl}}== |
||
<lang perl> |
<lang perl>@dx = qw< |
||
⚫ | |||
my @dx = qw< |
|||
-0.533 0.270 0.859 -0.043 -0.205 -0.127 -0.071 0.275 |
-0.533 0.270 0.859 -0.043 -0.205 -0.127 -0.071 0.275 |
||
1.251 -0.231 -0.401 0.269 0.491 0.951 1.150 0.001 |
1.251 -0.231 -0.401 0.269 0.491 0.951 1.150 0.001 |
||
Line 695: | Line 692: | ||
0.443 -0.521 -0.799 0.087>; |
0.443 -0.521 -0.799 0.087>; |
||
@dy = qw< |
|||
0.136 0.717 0.459 -0.225 1.392 0.385 0.121 -0.395 |
0.136 0.717 0.459 -0.225 1.392 0.385 0.121 -0.395 |
||
0.490 -0.682 -0.065 0.242 -0.288 0.658 0.459 0.000 |
0.490 -0.682 -0.065 0.242 -0.288 0.658 0.459 0.000 |
||
Line 710: | Line 707: | ||
-0.947 -1.424 -0.542 -1.032>; |
-0.947 -1.424 -0.542 -1.032>; |
||
sub mean { my $s; $s += $_ for @_; $s / @_ } |
|||
my @rule = ( |
|||
⚫ | |||
@rules = ( |
|||
sub { 0 }, |
sub { 0 }, |
||
sub { -$_[1] }, |
sub { -$_[1] }, |
||
Line 717: | Line 717: | ||
); |
); |
||
for (@ |
for (@rules) { |
||
print "Rule " . ++$cnt . "\n"; |
print "Rule " . ++$cnt . "\n"; |
||