Don't understand replacement rule for some functions
- To: mathgroup at smc.vnet.net
- Subject: [mg89538] Don't understand replacement rule for some functions
- From: Mac <mwjdavidson at googlemail.com>
- Date: Thu, 12 Jun 2008 02:58:38 -0400 (EDT)
Can somebody explain why the following replacement rule works
In[15]:= f[x] /. x -> y
Out[15]= f[y]
and this one complains
In[14]:= RandomReal[GammaDistribution[L, 1/L], 2] /. L -> 3
During evaluation of In[14]:= RandomReal::parpos: The parameter L in \
position 1 of GammaDistribution[L,1/L] should be positive >>
Out[14]= {1.89311, 1.11748}
I find it quite elegant to use replacements for complicated functions
but I'm never quite sure whether the replacement is actually carried
out because of such behavior.
Many thanks again for your help.
Mac
- Follow-Ups:
- Re: Don't understand replacement rule for some functions
- From: "Szabolcs HorvÃt" <szhorvat@gmail.com>
- Re: Don't understand replacement rule for some functions