Re: Using substitution rules to define a function
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: Using substitution rules to define a function
- From: bert at netcom.com (Roberto Sierra)
- Date: Thu, 31 Mar 1994 12:47:37 -0800
<< could anybody explain me what happens here ? Sol is a solution of an equation [munge] Here I want to define a function of w which returns the first solution. In[34]:= invf1[w_]:=sol[[1,1,2]] invf1[x] >> Try this: invf1[w_] := Evaluate[ sol[[1,1,2]] ]; If you intend to use new expressions in sol down the line and want invf1 to use the latest/greatest expressions, then you can also use: invf1[x_] := sol[[1,1,2]] /. w->x; Hope this helps... -- Roberto Sierra Tempered MicroDesigns San Francisco, CA