MPL - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Maple Language File (.mpl) Format

MPL file format

 

Description

Examples

Description

• 

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.

Examples

Write Maple commands to an MPL script in the home directory of the current user.

mplFileFileTools:-JoinPathmyscript.mpl,base=homedir

/Users/JohnSmith/myscript.mpl

(1)

FileTools:-Text:-WriteFilemplFile,catn := 20;\n,evalf[n](Pi);\n:

readmplFile

n20

3.1415926535897932385

(2)

Export a Maple expression to an MPL file and read it back.

exprCurveFitting:-Spline0,1.124,1,2.2322,2,3.343,3,2.334,v,degree=1

expr1.124+1.1082vv<11.1214+1.1108vv<25.3611.009votherwise

(3)

mplFileFileTools:-JoinPathpiecewise.mpl&comma;base=homedir

/Users/JohnSmith/piecewise.mpl

(4)

ExportmplFile&comma;expr

68

(5)

readmplFile

1.124+1.1082vv<11.1214+1.1108vv<25.3611.009votherwise

(6)

See Also

file

Formats