Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
RTableIsReal - test if an rtable contains only real data in external code
RTableCopyImPart - create a copy of only the imaginary part of a complex rtable in external code
RTableCopyRealPart - create a copy of only the real part of a complex rtable in external code
RTableZipReIm - combine two rtables into a single complex rtable in external code
Calling Sequence
RTableIsReal(kv, rt)
RTableCopyImPart(kv, rts, rt)
RTableCopyRealPart(kv, rts, rt)
RTableZipReIm(kv, rts, rt_re, rt_im)
Parameters
kv
-
kernel handle returned by StartMaple
rt, rt_re, rt_im
Maple rtable objects
rts
RTableSettings structure
Description
These functions are part of the OpenMaple interface to Microsoft Visual Basic.
The RTableIsReal function tests if a rtable contains only real-valued numeric data. Data is scanned only for rtables with data_type = RTABLE_DAG. When the data_type is RTABLE_COMPLEX or RTABLE_CXDAG, FALSE is immediately returned. For all other data_types, TRUE is immediately returned.
The RTableCopyRealPart function creates a new rtable containing only the real part of complex numeric data in the rtable rt. The new rtable has the settings in the supplied OpenMaple/VB/RTableSettings structure.
The RTableCopyImPart function creates a new rtable containing only the imaginary part of complex numeric data in the rtable rt. The result is an ordinary rtable of numeric data. If the specified data_type of rt is RTABLE_CXDAG or RTABLE_COMPLEX, the new rtable has 0s in the imaginary part, and the copied data in the real part. The new rtable has the settings in the supplied OpenMaple/VB/RTableSettings structure.
The RTableZipReIm function combines two real numeric rtables rt_re and rt_im into a complex rtable of the form rt_re + I*rt_im. Both rtables must be the same size. The new rtable has the settings in the supplied OpenMaple/VB/RTableSettings structure, provided such settings allow for storage of complex data.
Examples
Public Sub TestRTableMisc(ByVal kv As Long)
Dim rt, re, im, rt2 As Long
Dim index(0 To 1) As Long
Dim rts As RTableSettings
rt = EvalMapleStatement(kv, "Matrix(5,5,(i,j)->i+I*j);")
If Not RTableIsReal(kv, rt) Then
RTableGetDefaults kv, rts
rts.data_type = RTABLE_FLOAT64
rts.storage = RTABLE_RECT
' split the real and imaginary parts
re = RTableCopyRealPart(kv, rts, rt)
im = RTableCopyImPart(kv, rts, rt)
' zip them back together
rts.data_type = RTABLE_COMPLEX64
rt2 = RTableZipReIm(kv, rts, re, im)
MapleALGEB_Printf3 kv, "rtables = %a, %a, %a", re, im, rt2
End If
End Sub
See Also
LinearAlgebra[Zip], OpenMaple, OpenMaple/VB/API, OpenMaple/VB/Examples, rtable, trademarks
Download Help Document