maple2scilab
converts a Maple object,
either a scalar function or a matrix into a Fortran subroutine
and writes the associated Scilab function. The code of maple2scilab
is in the directory SCIDIR/maple
.
The calling sequence of maple2scilab
is as follows:
maple2scilab(function-name,object,args)
function-name
is a name indicating the
function-name in Scilab.
object
is the Maple name of the expression
to be transferred to Scilab.
object
.
maple2scilab
is invoked in Maple, two files are generated,
one which contains the Fortran code and another which contains the
associated Scilab function. Aside their existence, the user has not to
know about their contents.
The Fortran routine which is generated has the following calling sequence:
<Scilab-name>(x1,x2,...,xn,matrix)
and this subroutine computes matrix(i,j) as a function of
the arguments x1,x2,...,xn.
Each argument can be a Maple scalar or array which should be
in the argument list.
The Fortran subroutine is put into a file named <Scilab-name>.f, the
Scilab-function into a file named <Scilab-name>.sci.
For numerical evaluation in Scilab the user has to compile the Fortran
subroutine, to link it with Scilab (e.g. Menu-bar option 'link
')
and to load the associated function (Menu-bar option 'getf
').
Information about link
operation is given in Scilab's manual:
Fortran routines can be incorporated into Scilab by dynamic
link or through the Ex-fort.f
file in the default
directory.
Of course, this two-step procedure can be automatized using a shell-script
(or using unix
in Scilab).
Maple2scilab uses the ``Macrofort'' library which is in the share
library of Maple.