Repository for the MATLAB to Fortran compiler
Origin: Sable/Mc2For
License: Read
Manual: Release notes
Note: Only functions are supported (no scripts)
The following command generates a jar file, Mc2For.jar
.
cd languages/Natlab & ant jar-mc2for
Then,
java -jar Mc2For.jar examples/simple.m -args "DOUBLE&1*1&REAL" --codegen --pretty --outdir folder
The details of the command can be found as follow.
examples/simple.m
: source file(s)-args "DOUBLE&1*1&REAL"
: type and shape of parameter(s)--codegen
: generate FORTRAN code--pretty
: pretty result with stdout--outdir folder
: save result in a designatedfolder
* Don't forget --codegen if you want to get FORTRAN code
More information can be found with the following command line.
java -jar Mc2For.jar -help
Please send email to [email protected]
if you have any questions regarding the tool.