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
ArrayTools[Diagonal] - extract the diagonals from a Matrix or create a diagonal Matrix
Calling Sequence
Diagonal(A)
Diagonal(A, k)
Parameters
A
-
Matrix, Vector, Array, or scalar
k
(optional) integer
Description
For a matrix A, the Diagonal(A) command returns the main diagonal of A as a (column) vector.
For a matrix A, the Diagonal(A, k) command returns the (column) vector corresponding to the diagonal of A, specified by the selection parameter k.
For a vector A, the Diagonal(A) command returns a matrix with the entries of A along the main diagonal, and 0 everywhere else.
For a vector A, the Diagonal(A, k) command returns a matrix with the entries of A along the diagonal specified by the selection parameter k, and 0 everywhere else.
The diagonals of a matrix are indexed using signed integers, where the main diagonal has index 0. Superdiagonals are indexed with positive integers and subdiagonals are indexed with negative integers.
This function is part of the ArrayTools package, so it can be used in the short form Diagonal(..) only after executing the command with(ArrayTools). However, it can always be accessed through the long form of the command by using ArrayTools[Diagonal](..).
Examples
See Also
ArrayTools[LowerTriangle], ArrayTools[UpperTriangle]
Download Help Document