Here is a stupid trick. Did you know that you can use maple as a scripting language in Unix? Here's a little example.

Write a file "myscript:

-----begin-myscript-----
#!/usr/bin/env maple

plotsetup(maplet):

printf("This is an example of using Maple as a script\n");
sqrt((x^2-3)/Sum((x-a)^i,i=1..n));
plot(sin(x));
------end-myscript------

Make it executable with: "chmod a+x myscript", and execute "./myscript".

Make the output prettier by making "maple" an executable in your bin path to call  "/usr/local/maple/bin/maple -q -s" (or where ever your maple is installed).  Or make the shebang line "#!/usr/local/maple/bin/maple -q -s" if that works for you.

Together with preprocessing (see ?include), StringTools, FileTools, and Maplets. The possibilities are endless. Who needs perl?

(okay maybe you want to do something like pass arguments on the command line.  I couldn't find a simple way to do that, and that does severely limit the usefulness of this trick).


This has been branched into the following page(s):
Please Wait...