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
MapleSelectIndexed - select from a table, list, or rtable in external code
MapleSelectImaginaryPart - select the imaginary part of a complex-valued expression in external code
MapleSelectRealPart - select the real part of a complex-valued expression in external code
Calling Sequence
MapleSelectIndexed(kv, s, n, ind)
MapleSelectImaginaryPart(kv, s)
MapleSelectRealPart(kv, s)
Parameters
kv
-
kernel handle returned by StartMaple
s
an indexable Maple object
n
length of ind
ind
32-bit integer index array
Description
These functions are part of the OpenMaple interface to Microsoft Visual Basic.
The MapleSelectIndexed function retrieves the element s[ind], where s is a list, set, table, or rtable object. The index is an integer array. To reference s[1,2], set ind(0) = 1, and ind(1) = 2;.
The MapleSelectImaginaryPart function returns the imaginary part of s. The MapleSelectRealPart function returns the real part of s. These commands are equivalent to the Maple Im and Re commands.
Examples
Sub TestSelect(ByVal kv As Long)
Dim s, r As Long
Dim ind(2) As Long
s = EvalMapleStatement(kv, "Matrix([[red,yellow],[green,blue]]);")
ind(0) = 1
ind(1) = 2
r = MapleSelectIndexed(kv, s, 2, ind(0))
MapleALGEB_Printf1 kv, "r = %a", r
s = EvalMapleStatement(kv, "1.1+2.2*I;")
r = MapleSelectRealPart(kv, s)
MapleALGEB_Printf1 kv, "re = %a", r
End Sub
See Also
OpenMaple, OpenMaple/VB/API, OpenMaple/VB/Examples
Download Help Document