MathGroup Archive 2010

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

Search the Archive

Re: A general problem with numerical functions defined in a messy way

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108701] Re: A general problem with numerical functions defined in a messy way
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Sun, 28 Mar 2010 04:07:26 -0500 (EST)
  • References: <hoklig$sjj$1@smc.vnet.net>

The problem is that many of Mathematica's functions first try to find
a derivative of your function symbolically. So all you need to do is
define the arguments of your functions to be numeric to prevent
Mathematica from doing this.

Cheers -- Sjoerd

On Mar 27, 12:10 pm, ValeX <rjov... at gmail.com> wrote:
> let's say that i have a numerical function f[x] which is defined in a
> quite messy way.
> For example, it could be defined as a Module that contains If, Whiles,
> interpolation functions, Import, ..
> This function works well without any error if I simply evaluate it,
> for example if i write f[5] and hit the enter key.
>
> The (my) problem is that often when i plug such a function in other
> routines, like FindMinimum, i get all sorts of errors and it doesn't
> work.
> Is there a way to tell Mathematica to just compute f[x] and then use
> that result for other things?



  • Prev by Date: Re: Printing large PDF files generated from Mathematica
  • Next by Date: Re: Calling kernel.dll from Mathematica
  • Previous by thread: A general problem with numerical functions defined in a messy way
  • Next by thread: Re: A general problem with numerical functions defined in a messy way