Help for this page
use strict; use warnings; ... my ($x, $L, $x0) = @_; reduce{ $a+$b }map{ $L->[$_] * xdi($x,$x0,$_) }keys @$x }
use Chart::Gnuplot; use List::Util q(reduce); ... my $pts = Chart::Gnuplot::DataSet->new(xdata => $xx, ydata => $ff, sty +le => "lines"); Chart::Gnuplot->new(title => "f(x)", output => "plot.ps")->plot2d($pts +0, $pts);