Runge-Kutta method: Difference between revisions
Content deleted Content added
m →{{header|Perl}}: minor tweak |
m →{{header|Perl}}: oops, forgot to remove that |
||
Line 458: | Line 458: | ||
my ($yp, $t, $y, $dt) = @_; |
my ($yp, $t, $y, $dt) = @_; |
||
sub { |
sub { |
||
return $y unless $n++; |
|||
my @dy; |
my @dy; |
||
push @dy, $dt * $yp->( $t , $y ); |
push @dy, $dt * $yp->( $t , $y ); |