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
Matrix Definitions for the Matlab Package
Calling Sequence
function(M, ...)
Matlab[function](M, ...)
Description
A MatlabMatrix is a matrix defined in MATLAB memory space. In Maple, the matrix is always named as a string, with double quotes. For example, Matlab[inv]("M") computes the inverse of the variable, "M", which is defined in MATLAB. If a variable M is defined in Maple, it will be unaffected by, and have no effect on the stated call. The two calls, Matlab[inv](M) and Matlab[inv]("M") are very different.
A MapleMatrix is any Maple expression that is equivalent to a matrix. For example Array(1..2,[1,2]) is equivalent to [1,2], or Vector([1,2]). A MapleMatrix can be an rtable (Array, Matrix or Vector), a table, or a constant (numeric or complex numeric or a symbolic constant such as Pi or infinity). All elements of the MapleMatrix must be of type constant.
MATLAB has access to variables defined in its memory space, and Maple has access to variables defined in its memory space. Variables are not automatically shared between memory spaces; they must be explicitly set or read.
For example, if a user starts Maple and defines a matrix "M" by typing M := Matrix([[1,2],[3,4]]); the memory space looks like this.
Maple Memory
+--------------+
| M |
If that user then opens a link to MATLAB and sets a variable, "X", in MATLAB to the same value as "M" (using the command Matlab[setvar]("X", M);), the memory is as follows.
Maple Memory MATLAB Memory
+--------------+ +---------------+
| M | | X |
The variable M is a MapleMatrix, and "X" is a MatlabMatrix. The command Matlab[inv](M) copies the matrix M to MATLAB memory space, defining a temporary variable result_for_maple in the process. MATLAB computes the inverse of result_for_maple and sends the result back to Maple.
The command Matlab[inv]("X") computes the inverse of "X" and sends the result to Maple.
It is possible to define the name "M" in both Maple and MATLAB. After the command Matlab[setvar]("M", Pi), the memory spaces would be as follows.
| M | | X, M |
Consider the two commands Matlab[det](M), and Matlab[det]("M"). The subtle difference between these commands makes a significant difference in their results. The first command returns the determinant of the 2x2 matrix, M=[[1,2],[3,4]], which is -2. The second command returns the determinant of the 1x1 matrix, "M"=[Pi], which is Pi.
Examples
-2
3.14159265400000010
See Also
Matlab, Matlab[evalM], Matlab[getvar], Matlab[setvar]
Download Help Document