cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Fit double exponencial

SOLVED
M_U
Regular Member

Fit double exponencial

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

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Fit double exponencial

> 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

 

 

View solution in original post

14 REPLIES 14

Re: Fit double exponencial

The best tool for this problem is the MinErr function!

Re: Fit double exponencial

genfit applied

Re: Fit double exponencial

> 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

 

 

View solution in original post

Re: Fit double exponencial

fit.png

… and than a line!

Re: Fit double exponencial

Thank you FredKohlhepp, I tested your program and it worked fine but when I compared the result to another program, for example, Origin, the data differed a lot. I will try other suggestions here. Thank you anyway.

Re: Fit double exponencial

REALLY interesting:

Capture.PNG

Look at the functions.

Re: Fit double exponencial

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

Re: Fit double exponencial

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.

Re: Fit double exponencial


@M_U wrote:

Thank you FredKohlhepp, I tested your program and it worked fine but when I compared the result to another program, for example, Origin, the data differed a lot. I will try other suggestions here. Thank you anyway.


So why don't you post your sheet and the expected results so we could compare the quality of the various fits?

 

Announcements