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

MathGroup Archive 2004

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

Search the Archive

Re: Defining a function in module problem?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46007] Re: Defining a function in module problem?
  • From: phbrf at t-online.de (Peter Breitfeld)
  • Date: Mon, 2 Feb 2004 05:20:59 -0500 (EST)
  • References: <bvhpvs$8dh$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

jose flanigan <jflanigan at netzero.net> wrote:

> a[x_] := Module[{f, g}, g = z/3; f = Function[z, Evaluate[g]]; f[x]]

you could use

a[x_] := Module[{f, g}, g[z_] = z/3; f = Function[z, Evaluate[g]]; f[x]]

or even more simple:

a[x_] := Module[{f}, f = Function[z, Evaluate[z/3]]; f[x]]

-- 
Gruß Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany  -- <http://www.pBreitfeld.de>


  • Prev by Date: Drawing specific contours in a 3D Surface Plot?
  • Next by Date: When/why is Denominator[p/q] != q?
  • Previous by thread: RE: Drawing specific contours in a 3D Surface Plot?
  • Next by thread: Re: Defining a function in module problem?