MathGroup Archive 2009

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

Search the Archive

Re: SetDelayed::write ... [x_] is protected

I don't get that error. Anyway, I woulden't use SetDelayed (:=) in
this case, but Set (=) as the replacement in the former case is not
performed until after the function is called with an actual value.

Cheers -- Sjoerd

On Mar 24, 12:30 pm, "Serych Jakub" <Ser... at> wrote:
> Dear M users,
> I have solution of equations which is dependend on one parameter lets say=
> sol={{i1->220/x}, {i2 -> 100+x}} and I need to define function based on=
> solution with the x as argument lets say: myfun[x_]:=50*220/x + 2 (100+=
> I'm trying to do it like this:
> myfun[x_]:=50 * i1 + 2 * i2 /. sol
> But it prints the error message: "SetDelayed::write ... [x_] is protected=
> Does anybody know what's the problem and how to define such function?
> Thanks in advance
> Jakub

  • Prev by Date: Re: Got a tip ?
  • Next by Date: Re: Unexpected behavior of Floor and IntegerPart
  • Previous by thread: Re: SetDelayed::write ... [x_] is protected
  • Next by thread: Re: SetDelayed::write ... [x_] is protected