freeze, thaw - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Names and Strings : freeze

freeze, thaw

replace an expression by a name

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

freeze(expr)

thaw(var)

Parameters

expr

-

the expression to be ``frozen''

var

-

the ``frozen'' variable

Description

• 

freeze replaces its argument, expr (not a complex or real numeric constant, a name, or a string), with a name of the form freeze/R0, freeze/R1, ...

• 

To return the original expression the thaw function must be used.

• 

This can be used to prevent parts of an expression from being subjected to the effects of symbolic manipulation.

Examples

z := freeze(x+y);

zfreeze/R0

(1)

thaw(z);

x+y

(2)

e := cos(2*x)+sin(a+b);

ecos2x+sina+b

(3)

expand( e );

2cosx21+sinacosb+cosasinb

(4)

subs( 2*x = freeze(2*x), e );

cosfreeze/R1+sina+b

(5)

expand((5));

cosfreeze/R1+sinacosb+cosasinb

(6)

thaw((6));

cos2x+sinacosb+cosasinb

(7)

See Also

frontend