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
ArrayTools[ComplexAsFloat] - provide real view of a complex Matrix, Vector, or Array
Calling Sequence
ComplexAsFloat(A)
Parameters
A
-
rectangular storage Matrix, Vector, or Array of data type complex[8] or complex(sfloat)
Description
The ComplexAsFloat(A) command provides a double-size real view of an existing Matrix, Vector, or Array of complex[8] or complex(sfloat) data type. The input Matrix, Vector, or Array must have rectangular (dense) storage.
ComplexAsFloat does not change the underlying data of the input rtable object. Instead, ComplexAsFloat casts it to an rtable object with the same specifications, the corresponding float datatype, and double the size in one of the dimensions of the input rtable. As such, changes to the contents of the view also affect the contents of the original input rtable, and vice-versa.
If the original Matrix, Vector, or Array has been unassigned, it will still exist in the attributes of the real view, but changing the data will only affect the current view.
Important: Use this function with caution. If you remove the table reference from the attributes and unassign the original input object, accessing or changing the data in the view will crash Maple. If a persistent and permanent copy of the data is desired, then this command can be used in combination with copy or ArrayTools:-Copy.
The layout of the output view from ComplexAsFloat is different for C_order and Fortran_order input, as indicated in the following description.
If the input rtable is C_order, then the last dimension of the input is doubled on output, and the real and imaginary parts of the input are interleaved (alternating) with respect to the last dimension. For example, calling ComplexAsFloat with a C_order 3 x 4 Matrix results in a 3 x 8 Matrix where the odd columns contain the real parts of the input Matrix, and the even columns contain the imaginary parts (see the Examples section).
If the input rtable is Fortran_order, then the first dimension of the input is doubled on output, and the real and imaginary parts of the input are interleaved (alternating) with respect to the first dimension. For example, calling ComplexAsFloat with a Fortran_order 3 x 4 Matrix results in a 6 x 4 Matrix where the odd rows contain the real parts of the input Matrix, and the even rows contain the imaginary parts (see the Examples section).
This command can be used in combination with ArrayTools:-Fill to clear or set the real or imaginary parts of a complex Matrix, or can be used in combination with ArrayTools:-Copy to efficiently extract the real or imaginary parts of a complex Matrix.
This function is part of the ArrayTools package, so it can be used in the short form ComplexAsFloat(..) only after executing the command with(ArrayTools). However, it can always be accessed through the long form of the command by using ArrayTools[ComplexAsFloat](..).
Examples
C_order 3 x 4 Matrix
Use the Fill command to clear imaginary part only. Note this affects A and Ar.
Use the Copy command to extract the real part to an existing Matrix.
Fortran_order 3 x 4 Matrix
See Also
ArrayTools, ArrayTools[Copy], ArrayTools[Fill], C_order, copy, Fortran_order, Matrix
Download Help Document