Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

substitute values in Maple?

8 views
Skip to first unread message

Luna Moon

unread,
Nov 12, 2009, 2:47:33 PM11/12/09
to
Hi all,

I set alpha = 2 in Maple.

And I thought all the following expressions involving alpha should be
automatically changed to 2. But it didn't happen. All expressions
still show alpha instead of 2.

What shall I do?

Thanks a lot!

Axel Vogt

unread,
Nov 12, 2009, 3:03:06 PM11/12/09
to

alpha := 2;
------^----

Luna Moon

unread,
Nov 12, 2009, 3:15:18 PM11/12/09
to

That worked. Thanks a lot!

Ray Vickson

unread,
Nov 12, 2009, 3:48:18 PM11/12/09
to

Another way is to use the command 'subs(alpha=2,expr)' to make alpha =
2 in your expression 'expr'. Sometimes this is better than using the
method 'alpha:=2', because this last method changes alpha to 2
*everywhere* in your worksheet, and sometimes that is not what you
want. By using the 'subs' method instead, alpha will still be symbolic
as soon as the substitution/evaluation has been made.

R.G. Vickson

Axel Vogt

unread,
Nov 12, 2009, 3:51:54 PM11/12/09
to

Yes. Or 'eval(expr, alpha=2)'.

0 new messages