Maple Language File (.mpl) Format
MPL file format
Description
Examples
MPL (Maple Language File) is a text-based file format for Maple programs.
MPL files are simply text files containing statements conforming to the syntax of the Maple language. These are the same as statements that can be entered interactively.
MPL files can be executed from within Maple using the read statement.
The commands in a Maple worksheet can be exported to MPL format using the Export as Maple Input menu option.
The Export command can also export Maple expressions and programs to this format.
Write Maple commands to an MPL script in the home directory of the current user.
mplFile≔FileTools:-JoinPath⁡myscript.mpl,base=homedir
/Users/JohnSmith/myscript.mpl
FileTools:-Text:-WriteFile⁡mplFile,cat⁡n := 20;\n,evalf[n](Pi);\n:
readmplFile
n≔20
3.1415926535897932385
Export a Maple expression to an MPL file and read it back.
expr≔CurveFitting:-Spline⁡0,1.124,1,2.2322,2,3.343,3,2.334,v,degree=1
expr≔1.124+1.1082⁢vv<11.1214+1.1108⁢vv<25.361−1.009⁢votherwise
mplFile≔FileTools:-JoinPath⁡piecewise.mpl,base=homedir
/Users/JohnSmith/piecewise.mpl
Export⁡mplFile,expr
68
1.124+1.1082⁢vv<11.1214+1.1108⁢vv<25.361−1.009⁢votherwise
See Also
file
Formats
Download Help Document