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
MTM[subsref] - subscript reference of arrays
Calling Sequence
subsref(A,index)
Parameters
A
-
array or record
index
record, list, or array
Description
The subsref command mirrors subscript referencing in MATLAB. Using A(index) in MATLAB will produce the same result as subsref(A,index) indices.
In Maple, indexing is usually done using square brackets, as in A[i,j,k]. For an n-dimensional Array, A, you must specify n values. subsref allows you to provide fewer than n values, in which case the Array is indexed as if it only had that number of dimensions, with the last dimension being the size of the product of all remaining dimensions.
For example subsref(A,[i]) can be used to index into an m x n Array. In this case for the purpose of indexing, A is considered to be a 1D array of size mn in Fortran_order.
The specified index for any dimension can be an array itself. In this case, multiple values will be fetched from A. An array will be returned.
More complicated indexing, such as A(index1).index2(index3) require the use of a Record or array of Records with "type" and "subs" fields to specify the subreference for each indexing operation. The "type" field can have the values "()", "{}", or ".". There is no distinction between the first two, "()" and "{}", which indicate array-indexing. The "." type indicates an index into a Record. The "subs" field contains the actual index value. For example A(i,j) can be looked up via subsref(A,Record(type="()",subs=Array([i,j]))); Similarly A(i,j).name is accessible via subsref(A,< Record(type="()",subs=Array([i,j])) Record(type=".",subs="name") > );.
Examples
See Also
Fortran_order, MTM[subsasgn], Record
Download Help Document