MathGroup Archive 2006

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

Search the Archive

Re: Defining two functions at once?


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?