| Author |
Comment/Response |
MMGM
|
09/18/10 2:18pm
Hello, is this possible:
Clear[ x, y, z, g , replacement ];
replacement = { y -> z };
g[ x_ , z_ ] := (y * x /. replacement);
---------------------------------------
Ok i know that the behavior of the above code will be, for example:
g[ 2,2 ] = 2 * z (instead of 4)....
Is there any way to force the replacements on the right side of a function without using the operatarod "=" for the function definition ?
Like a "macro" substitution in the c language ...
Thanks in advance,
MIguel
URL: , |
|