Creating and Displaying Maplet Applications in Command-Line Maple
You can use the Command-Line version of Maple to create and display Maplet applications.
Description
Examples
To use Maplet applications in the Command-Line version, enter the Maplet application code at the Maple prompt as you would for Maple code.
Alternatively, using a text editor, enter a Maplet application definition into a text file. Save the text file with a .mpl extension.
Depending on your operating system, you can run the .mpl file by:
* Double-clicking it from your file browser or
* Entering maple and the filename as an argument at the command line.
The Maple code is executed in Command-Line Maple. If a Maplet application is defined with the Maplet[Display] command specified, it is displayed.
Copy the following Maplet application code into your Command-Line session. Press ENTER.
with⁡MapletsElements:
maplet ≔ Maplet⁡Click a Button:,Button⁡OK,Shutdown⁡true,Button⁡Cancel,Shutdown⁡:
result ≔ MapletsDisplay⁡maplet
Save the following example as a .mpl file. From your file browser, double-click the .mpl file you created.
useMapletsinuseElementsinmaplet ≔ Maplet⁡Window⁡'title'=Hilbert Matrix,Dimension: ,TextField'TB1'⁡10,Target format: ,DropDownBox'DDB1'⁡MATLAB,MatrixMarket,delimited,File name:,TextField'TB2'⁡hilmat,Button⁡OK,Shutdown⁡'TB1','DDB1','TB2',Button⁡Cancel,Shutdown⁡end use;result ≔ Display⁡mapletend use:ifresult≠andresult3≠thentryn ≔ parse⁡result1catch:end try;iftype⁡n,'integer'thenExportMatrix⁡result3,LinearAlgebra:-HilbertMatrix⁡n,outputoptions='datatype'=float8,'target'=convert⁡result2,'symbol'end ifend if:
See Also
Maplets[Display]
Maplets[Elements]
Maplets[Examples]
Maplets[Tools]
MapletViewer
Overview of Maplet Applications
Download Help Document