You are not logged in.
Pages: 1
Hello all,
I need to linearise the following Gaussian function:
f(x) = a1*exp(-((x-b1)/c1)^2)
but I'm having a really hard time to come up with what is going to be the Y, the X the m and the b (assuming y=mx+b as the expression that describes the line)
I only need this because I want to apply the method of least squares to compute those variables.. maybe there is a better way of doing this?
Thanks a lot
Vitor
Offline
Hi VitorSilva;
I am not sure I understand you. Usually a linearization occurs at one or more points.
You could take the natural log of both sides but you still will need some points to determine the constants.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Thanks bobbym,
I actually have a set of about 206 points, and I want to fit those points to a gaussian curve (I know this can be simply done using matlab (which I already did) but I'm currently on the process of coding this process in python and therefore I needed a little bit more of insight). If I had my points already following a line I would only use the traditional formulae to compute the slope (m) and the b values (y(x=0)). But I believe I still need to apply some changes to my values before I do this right?
Regards
Offline
Hi;
I have tried some transformations but with no luck.
If we say:
We are then creating coordinates (x, f(x))...
Using the transformation x -> 1 / y we are graphing (1/y, f(1/y))... This is nearly a straight line. You will have to leave out the point x = 0 to prevent a division by zero.
Trouble is that I cannot recover the f(1/y) back to f(x). You can recover the x's by inverting the 1 / y but not the other.
Another idea is to linearize by using Taylor series around 1. Since I do not know what your data looks like I centered it around one. Probably should be centered around the mean of your data.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
bobbym, thank you so much, I think I got everything I needed.
Cheers
Offline
Hi;
Please come back and let me know how you did.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Pages: 1