File: bessel

package info (click to toggle)
libmath-gsl-perl 0.45-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 192,156 kB
  • sloc: ansic: 895,524; perl: 24,682; makefile: 12
file content (18 lines) | stat: -rwxr-xr-x 465 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl -w
# Run this script in the same directory as plot_bessel.gnuplot
# i.e         cd examples/sf ; ./bessel
use strict;
use warnings;
use Math::GSL::SF qw/:bessel/;

my @x    = map { $_/ 100 } ( 0 .. 2000 ) ;
my @negx = map { -$_ } reverse @x ;

open my $fh, '>', 'bessel.data' or die $!;

for my $t (@negx, @x ) {
   print $fh join (" ", $t,  map { gsl_sf_bessel_Jn( $_, $t) } (0..5)) . "\n";
}
close $fh;

qx "gnuplot -persist plot_bessel.gnuplot";