Programming and Connectivity Changes in Maple 14
Maple 14 includes the following enhancements to programming facilities and connectivity to other tools.
Maple Toolbox included with Maple
Array of Bytes
Importing and Exporting MATLAB® Matrices
ExcelTools For Command-line Maple
Better Support for Anonymous Procedures
Task Programming Model
Task Model in External Call
The Maple Toolbox for is now included with Maple. For detailed information about installation of the Maple Toolbox, see the Maple 14 Install.html file.
The Maple-NAG® Connector is now included with Maple. Users of the NAG library can now access the full functionality of the NAG C library from within Maple. For detailed information about installation of the Maple-NAG Connector, see the Maple 14 Install.html file.
The ArrayTools[Alias] command was extended to allow aliasing an array with a different datatype than the original. This can be useful in conjunction with readbytes when reading mixed format binary files. For example, readbytes can be used to load a file into a integer byte Array. Then, after determining that the first 100 bytes constitute the file's header, the remaining bytes can be aliased as an array of double precision (float) floating-point numbers.
The StringTools package contains two new commands for data compression, Compress and Uncompress. These apply zlib compression and expansion of sets of data including strings and byte arrays.
The CodeTools package contains the new command Usage which can be used to measure the time and memory usage resulting from an command execution similar to time but with much more flexible output control.
memory used=10.06MiB, alloc change=35.01MiB, cpu time=87.00ms, real time=88.00ms, gc time=0ns
CodeTools[CPUTime] and CodeTools[RealTime] can be used as shortcuts for calling Usage with options output=[cputime,output] and output=[realtime,output] respectively.
The ListTools package contains the new commands FindMaximalElement, FindMinimalElement, SelectFirst, and SelectLast. These are efficient implementations of common list manipulation tasks.
SelectFirst(type, [1., 1/2, 1, 5.1, 2, 11], integer);
The ImportMatrix and ExportMatrix commands have been updated so that they can import and export MATLAB® binary files. MATLAB® Version 6 files without data compression or MATLAB® Version 7 files with compression are supported.
You can now import data from an Excel spreadsheet or export rtable data to an Excel spreadsheet while working in the command-line Maple environment, without having to run the Standard Worksheet interface. For more information on using the ExcelTools package, see ExcelTools.
The subs command can now perform substitutions in-place in Arrays, Matrices, and Vectors. This functionality is specified by appending inplace as an index to the command name.
A := <w,x;y,z>;
A new special parameter, thisproc, is available within procedures to facilitate recursive calling. Unlike procname, which refers to the name of the currently executing procedure, thisproc refers to the procedure itself, and thus can be used to make a recursive call within an anonymous procedure.
A new procedure option, option procname, causes a procedure to inherit the name of the procedure that called it for the purposes of error reporting. Thus, an exception raised in an inner procedure can be made to appear to have occurred in the enclosing procedure.
A new function has been added to the Task Programming Model. The Return function allows a Task to stop the execution of the Task Model and return a particular value from Start.
We have added functions to the External Call API to allow external code to access the Task Programming Model. Four new functions are available: MapleStartRootTask, MapleCreateContinuationTask, MapleStartChildTask, and MapleTaskReturn.
A new command, RunWorksheet, has been added to the DocumentTools package. This command executes a worksheet as if it were a procedure. The worksheet must be saved on disk, and there is a mechanism for passing arguments. The worksheet runs headless (no user interface) and modally (control does not return to the invoking worksheet until the called worksheet completes). It also runs in its own kernel.
For Maple 14, this function should be considered experimental; its design may change in a future release.
Index of New Maple 14 Features
Language and System Updates in Maple 14
Download Help Document