MathGroup Archive 2009

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97863] SetDelayed::write ... [x_] is protected
  • From: "Serych Jakub" <Serych at panska.cz>
  • Date: Tue, 24 Mar 2009 05:30:41 -0500 (EST)

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 this
solution with the x as argument lets say: myfun[x_]:=50*220/x + 2 (100+x);

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: Help x-y pairs with rules
  • Next by Date: Re: Help x-y pairs with rules
  • Previous by thread: Mathematica Tools Blog: FunctionsWithOption
  • Next by thread: Re: SetDelayed::write ... [x_] is protected