Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

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


  • Prev by Date: Re: Export Numbers
  • Next by Date: Re: Nonlinear Fit Problem
  • Previous by thread: rules->function
  • Next by thread: Re: rules->function