Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10392 > unrolled thread

Fitting complex functions or simultaneous fit of functions with identical parameters with Mathematica

Started byeastman <eastriverman@hotmail.com>
First post2012-06-08 07:36 +0000
Last post2012-06-08 07:36 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Fitting complex functions or simultaneous fit of functions with identical parameters with Mathematica eastman <eastriverman@hotmail.com> - 2012-06-08 07:36 +0000

#10392 — Fitting complex functions or simultaneous fit of functions with identical parameters with Mathematica

Fromeastman <eastriverman@hotmail.com>
Date2012-06-08 07:36 +0000
SubjectFitting complex functions or simultaneous fit of functions with identical parameters with Mathematica
Message-ID<jqsa1m$ddj$1@smc.vnet.net>
Greetings to all!

I have failed to solve a stubborn problem in fitting a complex- valued
Drude-Lorentz model (DLM) to experimental data using the
NonLinearFitModel of Mathematica. I'd prefer to do the fit with this
procedure since the errors of the experimental data are also known and
that procedure allows for weighting the fit with these errors.

The problem is as follows:

In terms of mathematics, the DLM is a complex-valued function of real
arguments or a set of two real-valued functions  i.e. real and
imaginary part. Obviously, both parts share the same set of
parameters.

Also obviously, fitting the real and imaginary part is not a good
idea, since one generally gets different parameter values for Re and
Im.

My idea was to put the real and imaginary part into one new real
function and I chose the square of the absolute value i.e. Re^2 +
Im^2. Transforming the experimental data correspondingly as well as
transforming the error data using the error propagation law, the fit
results showed excellent coincidence of the combined function to the
transformed data.

So far, so good. But the problem is: Inserting the parameter values of
this fit into Re and Im, the coincidence with the corresponding
experimental data is much less impressive, if not crappy.

So, this does not work.

What I then need is a recipe

(a) that urges NonLinearFitModel to fit Re and Im to the corresponding
experimental data simultaneously and putting out one set of parameter
vaules for both of them.

or

(b) urging NonLinearFitModel to fit the complex DLM directly.

I was looking for help in the net for quite a while and tried all the
proposals I found, but they simply do not work.

I have the suspicion that my problem is not that rare and so I'd like
to ask the experts in this group for some enlightment.

If possible, I'd prefer a do- it-yourself solution and not something
extended with libraries since I want to fiddle around with a potential
solution to customize it for my needs.

Many thanks in advance for any helpful hints!

cu
eastman



[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web