Services & Resources / Wolfram Forums
MathGroup Archive
*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: How to fit complex valued data?

  • To: mathgroup at
  • Subject: [mg64144] Re: How to fit complex valued data?
  • From: "Ray Koopman" <koopman at>
  • Date: Thu, 2 Feb 2006 00:07:07 -0500 (EST)
  • References: <drq0b1$mpt$>
  • Sender: owner-wri-mathgroup at

NMinimize[Norm[1/(1 + I b*data[[All,1]]) - data[[All,2]]]^2, {b}]

{1.5401072015490602*^-13, {b -> 1.0000000069007826}}

James McCambridge wrote:
> Esteemed Colleagues,
> I would like to fit a complex valued data set with FindFit (I'm willing to
> try other methods too, but I thought I'd start out with the basics). Is
> this possible?
> For example, I am interested in fitting the complex permittivity of liquid
> polymers vs frequency, which has a functional form:
> In[1]:=    expr[b_,x_]:=(1+I b x)^-1;
> Using this form to generate data, with b = 1.0, I get:
> In[2]:=    data ={{1,0.5 -0.5 I},{2.,0.2 -0.4 I},{3.,0.1 -0.3 I
> },{4.,0.0588235 -0.235294 I},{5.,0.0384615 -0.192308 I},{6.,0.027027
> -0.162162 I},{7.,0.02 -0.14 I},{8.,0.0153846 -0.123077 I},{9.,0.0121951
> -0.109756 I},{10.,0.00990099 -0.0990099 I}};
> Using FindFit, I come up against an error message.
> In[3]:=   FindFit[data,expr[b,y],{{b,1.}}, y]
> has the output
> Out[3]:=   FindFit::nrlnum: The function value {0.+0. I, 0.+0. I, -1.38778
> 10^-17+0. I, <<4>>, 0.+0. I, 0.+0. I, 0.+0. I} is not a list of real
> numbers with dimensions {10} at {b} = {0.}
> The form expr[0.,x] doesn't look poorly behaved, so what gives?
> I could separately fit the real and imaginary components, but this often
> gives two somewhat different sets of parameters; I would like to obtain
> the parameters which optimize the fit to BOTH the real and imaginary
> parts.
> Your comments and suggestions are greatly appreciated!
> Jim McCambridge
> This communication is for use by the intended recipient and contains
> information that may be Privileged, confidential or copyrighted under
> applicable law. If you are not the intended recipient, you are hereby
> formally notified that any use, copying or distribution of this e-mail,
> in whole or in part, is strictly prohibited. Please notify the sender by
> return e-mail and delete this e-mail from your system. Unless explicitly
> and conspicuously designated as "E-Contract Intended", this e-mail does
> not constitute a contract offer, a contract amendment, or an acceptance
> of a contract offer. This e-mail does not constitute a consent to the
> use of sender's contact information for direct marketing purposes or for
> transfers of data to third parties.
> Francais Deutsch Italiano  Espanol  Portugues  Japanese  Chinese  Korean

  • Prev by Date: Re: Trying to animate the rotation of a plane about an axis using dynamic visualizer - MoviePlot3D.nb (0/1)
  • Next by Date: Re: Utilizing the Result From Solve[]
  • Previous by thread: How to fit complex valued data?
  • Next by thread: Re: How to fit complex valued data?