Code covered by the BSD License  

Highlights from
maplePrompt

maplePrompt

by

 

Facilitates interaction with internal-Maple engine of MATLAB. Requires MATLAB 2008a or prior.

maplePrompt
function [result, status] = maplePrompt
% maplePrompt
%   interaction with the internal maple engine (requires MATLAB 2008a or before)
%   - at exit, the last 'maple' result and status are returned (if expected) 
%   Date       : 2009/03/21
%
%   Author        : Damith Senaratne, (http://www.damiths.info)
%   Released date : 24th August 2011 

display('============================================================');
display('''maplePrompt'' additional commands:');
display('- clc   : clear screen');
display('- clear : restart maple engine');
display('- exit  : terminate maplePrompt');
display('============================================================');
%maple('restart;');
r = [];
s = [];
while(true)
    cmd = input('maple >> ','s');
	if strcmp(cmd,'exit')
        if nargout == 2
            result = r;
            status = s;
        elseif nargout == 1
            result = r;
        end
      
        display('bye, bye!');
        break;
    elseif strcmp(cmd,'clc')
        clc;
    elseif strcmp(cmd,'clear')
        maple('restart;');
    else
        [r,s] = maple(cmd); % invoke maple engine!
        disp(r)
    end
end

Contact us