Previous Up Next

6.12.20  Substituting a variable by a value (Maple and Mupad compatibility): subs

In Maple and in Mupad, you would use the subs command to substitute a variable by a value in an expression. But the order of the arguments differ between Maple and Mupad. Therefore, to achieve compatibility, in Xcas, the subs command arguments order depends on the mode (see Section 3.5.2).

In Maple mode:


Examples.

In Mupad or Xcas or TI modes, subs behaves like subst (see Section 6.12.18).


Examples.

Note that subs does not quote its argument, hence in a normal evaluation process, the substitution variable should be purged otherwise it will be replaced by its assigned value before substitution is done.


Previous Up Next