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
ContextMenu[CurrentContext][Queries][Run] - run query on selected object
Calling Sequence
Queries[Run](nm, expr)
Parameters
nm
-
string; name of query
expr
(optional) anything; object to which the query is applied, embessed in a list
Description
The Queries[Run] command returns the result of applying the query named nm to the contents of the list expr. It may be called from within entry generators (see EntryGenerators) or from within other queries.
The parameter nm is the name of the query to be run. The parameter expr is the object (embedded in a list) to which the query is applied; if omitted, the selected object (also embedded in a list) is used. Note that the object must be embedded in a list to allow handling of expression sequences, as Queries[Run] only takes a single fixed argument for the object the query applies to.
Examples of Queries[Run]
with(ContextMenu[CurrentContext]):
Run the "D.E." query that determines whether an equation is a differential equation.
Queries[Run]("D.E.", [diff(y(x),x,x) = cos(2*x)/sin(2*x)*diff(y(x),x)-2*y(x)]);
Queries[Run]("D.E.", [x^2+5*y=19]);
Run a query that checks whether an expression sequence has booleans.
Queries[Run]("no bools", [1, 2, x, Matrix(<<1,2>>)] );
Queries[Run]("no bools", [1, 2, x, true, Matrix(<<1,2>>)] );
Add a query that determines whether the object has exactly 20 variables using the "NumVars" query.
Queries[Add]("20 vars", proc() evalb(Queries[Run]("NumVars", [args]) = 20) end proc);
Add an entry generator that allows the user to select one of the variables that appears in the right-clicked expression using the "Variables" query.
EntryGenerators[Add]("Variables", proc() local vars; try vars := Queries[Run]("Variables"); [seq([sprintf( "%a", op(i, values) ), [op(i, values)]], i=1..nops(values))]; catch: end try; end proc);
See Also
ContextMenu, ContextMenu[CurrentContext][Queries], Queries/Add, Queries/Get, Queries/List
Download Help Document