Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
Engine.evaluate - evaluate a Maple statement
Calling Sequence
Algebraic evaluate( String statement ) throws MapleException
Parameters
statement
-
Maple statement to be evaluated
Description
The evaluate method parses then evaluates statement and returns the results as an Algebraic object.
The statement parameter must be terminated with a colon or semicolon. Using a colon suppresses output being generated.
Errors generated during the parse and evaluation of the statement are directed to the errorCallBack method. Other errors cause a MapleException to be raised.
Examples
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
public static void main( String notused[] ) throws MapleException
String mapleArgs[];
Engine engine;
mapleArgs = new String[1];
mapleArgs[0] = "java";
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
null, null );
engine.evaluate( "int(x,x);" );
engine.evaluate( "LinearAlgebra:-RandomMatrix( 3, 3 );" );
try
engine.evaluate( "syntax_error" );
}
catch ( MapleException me )
System.out.println( "Error: "+me.getMessage() );
Executing this code produces the following output.
1/2*x^2
Matrix(3,3,{(1, 1) = -21, (1, 2) = -50, (1, 3) = -79, (2, 1) = -56, (2, 2) = 30, (2, 3) = -71, (3, 1) = -8, (3, 2) = 62, (3, 3) = 28},datatype = anything,storage = rectangular,order = Fortran_order,shape = [])
Error: at offset 13, unexpected end of statement
See Also
ExternalCalling/Java/MapleException, OpenMaple, OpenMaple/Java/Algebraic, OpenMaple/Java/API, OpenMaple/Java/Engine, restart
Download Help Document