Forum archive 2000-2006

John E. Doner - foreign functions

John E. Doner - foreign functions

by Arnold Pizer -
Number of replies: 0
inactiveTopicforeign functions topic started 9/28/2005; 6:56:41 PM
last post 9/28/2005; 6:56:41 PM
userJohn E. Doner - foreign functions  blueArrow
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

<| Post or View Comments |>