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[SearchArray] - return the indices of nonzero elements of the given Array
Calling Sequence
ind := SearchArray(A);
ind := SearchArray(A, n);
ind := SearchArray(A, location = last);
row, col := SearchArray(A, ...);
row, col, val := SearchArray(A, ...);
Parameters
A
-
the given Array
n
(optional) the number of indices returned
location = last
(optional) last n numbers will be returned; the default returns the first n numbers
ind
the Array stores returned indices
val
the Array stores values of found non-zero numbers
row
the Array stores the row numbers of returned indices
col
the Array stores the column numbers of returned indices
Description
The SearchArray(A) function returns a vector of numbers such that each element in the returned vector corresponds to an index of a non-zero entry in A.
The SearchArray(A, n) and SearchArray(A, n, location = first) functions return a vector of the first n indices corresponding to non-zero entries in A.
The SearchArray(A, n, location = last) function returns a vector of the last n indices corresponding to non-zero entries in A.
The row, col := SearchArray(A, ...) function returns two Vectors corresponding to the paired row and column indices for non-zero entries in A.
The row, col, val := SearchArray(A, ...) function returns two Vectors corresponding to the paired row and column indices for non-zero entries in A and returns in the third Vector the value of the array A at each of these positions.
This function is part of the ArrayTools package, so it can be used in the short form SearchArray(..) only after executing the command with(ArrayTools). However, it can always be accessed through the long form of the command by using ArrayTools[SearchArray](..).
Examples
See Also
ArrayTools, ArrayTools[RandomArray], , ArrayTools[RegularArray], , ArrayTools[Size], , rtable_indexing
Download Help Document