       Re: fit a complex function

• To: mathgroup at smc.vnet.net
• Subject: [mg98975] Re: fit a complex function
• From: dh <dh at metrohm.com>
• Date: Thu, 23 Apr 2009 06:41:34 -0400 (EDT)
• References: <gsmn0k\$d2r\$1@smc.vnet.net>

```
Hi,

you can not directly fit a complex function. But you may defined an

error function of the parameters, that returns a real number, specifying

the error. If you then search the minimum of this function over the

parameters, you have solved your problem.

here is a simplified version with 1 dim. where we fit Exp[I a x]:

====================================

d = Table[{x, Exp[2 I x]}, {x, 0, Pi, Pi/10}];

err[a_] := Total[Abs[ d[[All, 2]] - ( Exp[a I #] & /@ d[[All, 1]])]^2];

FindMinimum[err[a], a]

====================================

Daniel

Magician wrote:

> I have  data in the following form

>

> xi  , Fi            (xi is real but Fi is complex)

>

> i want to determine a fit by using function

>

> F(x, a , b,c, d)=    a Exp(- x^2/b) + c Sin( d x)

>

> a, b, c and d are complex numbers to be determined so as to accurately

> represent the data.

>

> How to do this problem?

>

>

```

• Prev by Date: Re: Has Fourier been fixed in Mathematica 7
• Next by Date: Re: fit a complex function
• Previous by thread: Re: fit a complex function
• Next by thread: Re: fit a complex function