About_M2SCI_tools - Generally speaking about tools to convert Matlab files to Scilab...
Scilab 3.0 includes a new version of useful tools to convert Matlab M-files to Scilab.
Taking a Matlab M-file, mfile2sci modifies this files so that it can be compiled by Scilab. After that this compiled code is converted to a "tree" of instructions by macr2tree . This "tree" is an imbrication of Scilab lists and tlists and is the basis for conversion. Each instruction of this "tree" is converted to Scilab and inference is done to known what are the variables. Once this "tree" is converted to Scilab, code is generated using tree2code .
All tlists used for coding this tree (and we call "MSCI tlists") are listed below:
The contents of these tlists is described in corresponding help pages.
Operations are converted using a fonction named %<opcode>2sci with opcode the Scilab code for this operator. See help page for overloading to have these codes. All these functions are already written and are in directory SCI/macros/m2sci/percent/.
Function calls are converted using a function called sci_<Matlab_function_name> . Some of these functions have been written and are in directory SCI/macros/m2sci/sci_files/. We are working on increasing the set of Matlab functions converted. However, everybody can written such functions using help page sci_files.
Inference is done using tlists of type "infer" containing fields:
Type is a tlist of type "type" containing fields:
To have more details about inference see help page for m2scideclare.
mfile2sci , translatepaths , overloading , sci_files , Funcall , Operation , Variable , Cste , Infer , Type , Equal , m2scideclare ,