Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Engine.newExpseq - create a new ExpSeq
Calling Sequence
Expseq newExpseq( int length ) throws MapleException
Parameters
length
-
length of the expression sequence to be returned
Description
The newExpseq method creates a new Maple expression sequence of length length. The expression sequence is represented with a Expseq object.
The elements of the expression sequence must be initialized and the unique member function must be called before it can be passed into a Java Open Maple function.
Errors that occur within the Maple session are reported via errorCallBack, other errors are raised as a MapleException.
Examples
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
public static void main( String notused[] ) throws MapleException
String mapleArgs[];
Engine engine;
Expseq e;
mapleArgs = new String[1];
mapleArgs[0] = "java";
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
null, null );
e = (Expseq)engine.newExpseq( 3 );
e.assign( 1, engine.newNumeric( 12345 ) );
e.assign( 2, engine.newNumeric( 1.8 ) );
e.assign( 3, engine.newNumeric( 1./3 ) );
e = (Expseq)e.unique();
System.out.println( e );
}
Executing this code produces the following output.
[12345, 1.80000000000000004, .333333333333333315]
See Also
exprseq, ExternalCalling/Java/MapleException, OpenMaple, OpenMaple/Java/API, OpenMaple/Java/Engine
Download Help Document