Skip to main content
1-Visitor
August 22, 2018
Solved

Fit double exponencial

  • August 22, 2018
  • 3 replies
  • 7164 views

Hello,

I want to set a function of type y = A1 + A2 * exp (-X / A3) + A4 * exp (-X / A4) to my data. I need to find the values ​​of Ai. I tried to use the genfit function and an error occurred. I saw in the forum that there are several tips, but I am a beginner in Mathcad, and would like some help. Attached follows the data I would like to perform my function.


Thank you

This topic has been closed for replies.
Best answer by Werner_E

> I tried to use the genfit function and an error occurred.

So why don't you attach your Mathcad sheet and show the error.

genfit and a solve block with minerr usually come up with the very same result.

Unfortunately they rely heavily on good guess values and may react quite sensible to changes of the guesses. This may be the reason for genfit failing in your try.

 

EDIT: I gave it a try, too, but Fred was faster.

The system is VERY sensible with respect to the guess values and the difference in the resulting values for Ai when changing the guesses are quite big.

Nevertheless I wonder why with Freds sheet I get values so much different from mine even when using the very same guesses!?

B.png

 

 

3 replies

24-Ruby IV
August 22, 2018

The best tool for this problem is the MinErr function!

23-Emerald I
August 22, 2018

genfit applied

24-Ruby IV
August 22, 2018

fit.png

… and than a line!

25-Diamond I
August 22, 2018

Valery, that data sure could be fitted in many quite different ways (some shown in the screenshots below).

But I guess that ulisses has good reasons to choose exactly the type of function he posted.

B1.pngB2.png

Werner_E25-Diamond IAnswer
25-Diamond I
August 22, 2018

> I tried to use the genfit function and an error occurred.

So why don't you attach your Mathcad sheet and show the error.

genfit and a solve block with minerr usually come up with the very same result.

Unfortunately they rely heavily on good guess values and may react quite sensible to changes of the guesses. This may be the reason for genfit failing in your try.

 

EDIT: I gave it a try, too, but Fred was faster.

The system is VERY sensible with respect to the guess values and the difference in the resulting values for Ai when changing the guesses are quite big.

Nevertheless I wonder why with Freds sheet I get values so much different from mine even when using the very same guesses!?

B.png

 

 

23-Emerald I
August 22, 2018

REALLY interesting:

Capture.PNG

Look at the functions.

25-Diamond I
August 22, 2018

Yes, I also just noticed that the e^x and exp(x) give different results.

If I define exp(x):=e^x in front of my sheet, I get the same results as your sheet.

After optical inspection it looks like the results with exp(x) give a better fit than e^x.

Crazy and unexplainable indeed.