Forums

Search results: 21

WeBWorK Main Forum -> adding PDL support

by Darwyn Cook -
I am writing some questions for our Advanced Engineering Math course that require the use of Bessel functions. I am trying to install the PDL library to support these functions, following the directions here: http://webwork.maa.org/moodle/mod/forum/discuss.php?d=799#p2607.

I have PDL installed, and have checked that it works through the command line interface. I moved two modules, Math.pm and BESSEL.pm, into the pg/lib directory. I added these module names to the PG_module_list.pl file and into global.conf. I then created a macro file PGspecialfunctionsmacros.pl in the pg/macros folder which handles the sub _*_init.

I wrote a simple problem to test the module, using

$x = bessjn(4.1,3).

In the PDL shell this returns 0.433314702561693 in the perl shell. In a problem if I use the code
$x= bessjn(4.1,3)
BEGIN_TEXT
\($x\)
END_TEXT
I get Error: Operation ".": no method found as an output.

If I use $x = Compute("bessjn(4.1,3)" ); I get Not a HASH reference at [PG]/lib/Value.pm.

Any ideas on where I should go next?