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
comparray - compare the entries of two arrays or lists
Calling Sequence
comparray(A, B,...)
Parameters
A
-
Array or list or list of lists
B
Description
For brevity, it is assumed in what follows that the 1st two arguments are arrays. Either or both of them may be lists or lists of lists.
If the last argument is dontprint then the lprinting of intermediate test results is suppressed. Otherwise, the results are lprinted in an array-like manner, giving a visual representation of the entries which agree and disagree.
If only 2 arguments are given, or if 3 arguments are given and the 3rd one is dontprint, then a straight boolean comparison of the entries of the input arrays is done.
Otherwise, testfloat is invoked to do the comparison of the entries in the input arrays. All arguments to comparray after the first two (but excluding dontprint, if present) are passed to testfloat as the 3rd, 4th, etc parameters to that routine. Note that this implies that the same error bound will be applied to all entries in the arrays, and that the input array B is considered to contain the ``correct'' values. See testfloat for more details.
In either case, if the dimensions of the input arrays do not match, no further processing is done.
If any of the entry comparisons fail, comparray returns false. Otherwise it returns true.
Examples
[true, true, false] [false, true, true] [true, true, true]
[[false, 3., `ulps `], true, true]
See Also
testfloat, verify[array], verify[list], verify[listlist]
Download Help Document