MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with using /.


Nag wrote:
> Hello:
> 
> I am trying to compute the moments of a distribution using the moment
> generating function, MGF[t,k]. Here is the relevant function for
> computing the j'th moment.
> 
> M[j_, t_, k_] :=    D[MGF[t, k], {t, j}] /. {u -> 0, Sum[Subscript[p,
> i],{i, 0, k}] = 1};
> 
> After taking the j'th derivative, need to set u to 0 and the sum of
> p(i)'s to 1.

Why have you replaced the rule sign -> sign by the = sign?

M[j_, t_, k_] := D[MGF[t, k], {t, j}] /. {u -> 0, Sum[Subscript[p, i], 
{i, 0, k}] -> 1};

HTH,
Jean-Marc


  • Prev by Date: Re: Unexpected "Invalid comparison" error when plotting function defined with a Condition pattern
  • Next by Date: Re: Dot Product in Cylindrical Coordinates
  • Previous by thread: Problem with using /.
  • Next by thread: Re: Problem with using /.