Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
MTM[subs] - substitute expressions into an expression
Calling Sequence
subs(e)
subs(e,n)
subs(e,o,n)
Parameters
e
-
expression
n
o
Description
The function subs(e) is equivalent to eval(e).
The function subs(e,n) replaces occurences of the default variable in e with the expression n. The default variable is determined by findsym(e,1).
For scalar o, the function subs(e,o,n) replaces occurences of o, in the expression e, with n. If n is a vector or matrix, then the operations ^, + and * (and therefore - and /) are performed element-wise.
For non-scalar o, the function subs(e,o,n), replaces each element of o with the corresponding element of n. In this case, the structure and size of o and n must be the same. The substitution of elements occurs in series.
Examples
See Also
eval, MTM[findsym], MTM[times]
Download Help Document