foreign functions | topic started 9/28/2005; 6:56:41 PM last post 9/28/2005; 6:56:41 PM |
John E. Doner - foreign functions 9/28/2005; 6:56:41 PM (reads: 218, responses: 0) |
Matrix.pm
provides a number of useful matrix functions, but by no means all that
one might want in a linear algebra course. It's possible to write them
in Perl. But maybe it would be easier to pass such probles on to
something designed for the purpose, like matlab or octave. To do this requires Perl code to translate whatever internal format is in use for matrices and vectors to things that the other program can read, and then translate the results back into WeBWorK's format. I did this for the case of RREF (Reduced Row Echelon Form), but to make the call requires use of ` ... `, and it has to go in PGdangerousmacros.pm. I put a subroutine there that does `$arg`, where $arg is the first argument. (Of course, all this is going on in an installation we use for experiments.) What are the pros and cons of doing this? John Doner |