Re: rules->function
- To: mathgroup at smc.vnet.net
- Subject: [mg7396] Re: [mg7338] rules->function
- From: "Sherman.Reed" <sherman.reed at worldnet.att.net>
- Date: Fri, 30 May 1997 01:20:03 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
This worked for me zrule=z->x^2+y^2 f[x_,y_]=x+2*y+3+z/.zrule f[a,b] Sherman C. Reed sherman.reed at worldnet.att.net ---------- > From: Lord of Darkness <j.biddiscombe at rl.ac.uk> To: mathgroup at smc.vnet.net > To: mathgroup at smc.vnet.net > Subject: [mg7396] [mg7338] rules->function > Date: Tuesday, May 27, 1997 9:27 PM > > Hello All, > > If I solve a set of simultaneous equations and get a simple answer like > zrule = z-> x^2 + y^2 > > but I then want to evaluate > fn[x_,y_] := z + some more stuff..... > > I tried saying > > fn[x_,y_] := Replace[z,zrule] + .... > > but it doesn't seem to handle it the way I wanted... > > Is there a correct way of doing this ? > > thanks > > John B