Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: Defining two functions at once?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70760] Re: Defining two functions at once?
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Thu, 26 Oct 2006 02:39:12 -0400 (EDT)
  • References: <ehmttr$sd0$1@smc.vnet.net>

I hope the following will help you a little.

Clear[f, g]

g[a_] := f[a] = FindRoot[Cos[a*x] - x, {x, 0}]

g[2]
{x -> 0.5149332646611294}

f[2]
{x -> 0.5149332646611294}

Regards
Dimitris


  • Prev by Date: Re: Quizzes and Tests
  • Next by Date: Numeric Report by M. Sofroniou
  • Previous by thread: Re: how to compact many maps?
  • Next by thread: Re: Defining two functions at once?