Rajini
- 619
- 4
Hello all,
I have a data which look like reversed exponentially modified Gaussian (EMG) function and interested to fit the data with with reversed EMG function. After searching on internet I found the EMG function, which is given below:
##y=\frac{ac\sqrt{2\pi}}{2d}\rm{exp}[\frac{c^2}{2d^2}-\frac{x-b}{d}][\frac{d}{|d|}+\rm{erf}(\frac{x-b}{c\sqrt2}-\frac{c}{d\sqrt2})]##
gnuplot code
Here a=Gaussian height, b=Gaussian position, c=Gaussian width, d=time constant.
When I plot the above function in gnuplot I get a curve shown in fig1.
Now I reversed the EMG so the function becomes as below (just changed the signs):
##y=\frac{ac\sqrt{2\pi}}{2d}\rm{exp}[\frac{c^2}{2d^2}+\frac{x-b}{d}][\frac{d}{|d|}-\rm{erf}(\frac{x-b}{c\sqrt2}-\frac{c}{d\sqrt2})]## and the curve is shown in fig2.
gnuplot code
For the above two EMGs I used a=2, b=30, c=1, and d=3.
1. My doubt is why both curves has different height (height a)? or I did anything wrong? Is 'a' really height?
2. I took 'a' as 2. But the height is 0.9 for EMG (fig1) and 1.13 for reversed EMG (in fig2).
Any insights will be helpful.
Thanks for your reply
Cheers,
Rajini
I have a data which look like reversed exponentially modified Gaussian (EMG) function and interested to fit the data with with reversed EMG function. After searching on internet I found the EMG function, which is given below:
##y=\frac{ac\sqrt{2\pi}}{2d}\rm{exp}[\frac{c^2}{2d^2}-\frac{x-b}{d}][\frac{d}{|d|}+\rm{erf}(\frac{x-b}{c\sqrt2}-\frac{c}{d\sqrt2})]##
gnuplot code
PHP:
f(x)=(((a*c*sqrt(2*pi))/(2*d))*exp(((c*c)/(2*d*d))-((x-b)/d))*((d/(abs(d)))+erf(((x-b)/(c*sqrt(2)))-(c/(d*sqrt(2))))))
When I plot the above function in gnuplot I get a curve shown in fig1.
Now I reversed the EMG so the function becomes as below (just changed the signs):
##y=\frac{ac\sqrt{2\pi}}{2d}\rm{exp}[\frac{c^2}{2d^2}+\frac{x-b}{d}][\frac{d}{|d|}-\rm{erf}(\frac{x-b}{c\sqrt2}-\frac{c}{d\sqrt2})]## and the curve is shown in fig2.
gnuplot code
PHP:
f(x)=(((a*c*sqrt(2*pi))/(2*d))*exp(((c*c)/(2*d*d))+((x-b)/d))*((d/(abs(d)))-erf(((x-b)/(c*sqrt(2)))-(c/(d*sqrt(2))))))
1. My doubt is why both curves has different height (height a)? or I did anything wrong? Is 'a' really height?
2. I took 'a' as 2. But the height is 0.9 for EMG (fig1) and 1.13 for reversed EMG (in fig2).
Any insights will be helpful.
Thanks for your reply
Cheers,
Rajini
Attachments