MathGroup Archive 2006

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

Search the Archive

Re: Problem with using /.


Peter Pein wrote:
>
> Hi Nag,
>
> you try to assign a value to Sum[...]; this becomes Set[Sum[...],0] --
> but Sum is a Protected function. Furthermore, Set is not Rule.
>
> I guess you wanted:
>
> M[j_, t_, k_] := FullSimplify[D[MGF[t, k], {t, j}] /. u -> 0,
>      Sum[Subscript[p, i], {i, 0, k}] == 1];
>
> You can use Simplfy instead of FullSimplify too.
>
> Peter

Hi Peter:

The = was a typo. It should have been a  ->
With  -> there is no error but the substitution doesn't happen.
The substitution works when I use == as you suggested.

Why does -> not work but == work?

Thanks
Nag


  • Prev by Date: Co-Displaying Combinatorica and Graphics Objects
  • Next by Date: Re: Array
  • Previous by thread: Re: Problem with using /.
  • Next by thread: Re: Problem with using /.