TGraph fit with a nested function

ROOT Version: 6.12/04
Platform: Fedora 27
Compiler: gcc version 7.3.1

I have a set of (x,y) data points which I plot in a TGraph.
What I would like to do, is fit them using a user defined function.
The problem is that the function I want to use is a nested function and has the format

f(x) = [0]*x/TMath::Exp( [1]*f(x) )

Any idea on how to implement this ?

Thanks in advance!

I guess the proper name is: implicit function.

Looking at the form of your implicit equation, I would say you should “swap” variables in your “data points” and then try to fit:

x = f(y) = y * TMath::Exp( [1] * y ) / [0] // exchange "x" and "y" here

In my case you are right, this can work.
But what if you cannot have a x=f(x) relation?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.