MathGroup Archive 2011

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

Search the Archive

Re: getting ride of 0.i

  • To: mathgroup at
  • Subject: [mg120542] Re: getting ride of 0.i
  • From: Armand Tamzarian <mike.honeychurch at>
  • Date: Thu, 28 Jul 2011 07:54:20 -0400 (EDT)
  • Delivered-to:
  • References: <j0oomv$krj$>

On Jul 27, 8:19 pm, Eli Fenichel <Eli.Fenic... at> wrote:
> I am trying to use FindMinimum to minimize the square of a function over 
many variables (i.e., parameters).  The function itself has the potential
 to generate imaginary numbers and involves numerical integration (the parameter values that minimize the function are real).  For clarification the function in evaluated at multiple points so it can be written as vector. By squaring the vector the numerical values of the elements are always real with no imaginary parts.  However, Mathematica often writes x + 0.i, where x is a some numerical value, for some of the elements.
> Typically, this can be ignored, the Chop command can be used, or it simply does not cause problems.  However, I keep getting an error: [cid:image003.... at 01CC4BBC.E87A0F30]
> NIntegrate::nlim: "t = Y[1.] is not a valid limit of integration."
> Y is an array with the parameters to be minimized.
> However, if evaluate the objective function to be minimized using replacement rules I get
> x + 0.i.
> Is there a way for me tell Mathematica to always treat 0.i as 0 and drop it?  It seems to be causing problems in the FindMinimum call.
> Thanks,
> Eli

Re[3 + 2 I]

  • Prev by Date: Re: Genomes Mathematica knows about and how to use them?
  • Next by Date: Re: And now for something completely different
  • Previous by thread: getting ride of 0.i
  • Next by thread: Re: getting ride of 0.i