The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Voigt like fitting function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

a.abc.b35

175 Posts

Posted - 07/07/2011 :  4:36:23 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.5.1
Operating System:win 7
...............
Hi I have a fitting function which involves two definite integrals from 0 to 1 and -2 to 2 (say). I have written a nlfit origin C code (using NAG library) for that and been using it for a while. IT works great but is slow ! Now I have recently noticed the Voigt function,viz,
.............................
.............................

which is written in origin as below (accessed from NLFIT window, by F9 button):
quote:
y = y0 + (A*2*ln(2)*wL)/(Pi^1.5*wG^2) * integ( exp(-t^2) / ((sqrt(ln(2))*wL/wG)^2+(sqrt(4*ln(2))*(x-xc)/wG-t)^2) )


After seeing this, and also the fastness of the Voigt fit, I want to change my fitting function in this format, especially, I want to use the
quote:
integ
function but in my case limits are 0 to 1 and -2 to 2 instead of -infinity to +infinity, as in Voigt.
Can anyone tell me how to use that function for a definite integral or if there is something else like this ? Also a web link to origin help for help on this function will be very much appreciated.


AB

Penn

China
644 Posts

Posted - 07/07/2011 :  9:58:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi AB,

Maybe you can refer to this tutorial.

Penn
Go to Top of Page

a.abc.b35

175 Posts

Posted - 07/07/2011 :  11:07:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Penn, I have used the above tutorial to write my integration function and is using it for a while now. But I recently saw the fastness of the integ function in Voigt and wanted to use that intead of the NAG integration I have made. But am having difficulty in locating even a help file for it. Hope the question is clear now.

AB

Edited by - a.abc.b35 on 07/08/2011 02:17:55 AM
Go to Top of Page

minimax

351 Posts

Posted - 07/08/2011 :  04:10:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi AB,

In fact, the integ function in Voigt is not a real function.

It is simply a notation to indicate the integral.

Sorry for the confusion; we should have add some comments in that function to avoid misleading.

As to the slowness, we will check and response to you soon.

Max
OriginLab Technical Support
Go to Top of Page

a.abc.b35

175 Posts

Posted - 07/08/2011 :  8:50:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
@ minimax : can you give me some info about it so that I can use it in my case. Writing a fitting function involving integration then becomes a whole lot easier !

AB
Go to Top of Page

a.abc.b35

175 Posts

Posted - 07/12/2011 :  12:32:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Anyone listening ?

AB
Go to Top of Page

larry_lan

China
Posts

Posted - 07/12/2011 :  11:22:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi AB:

The most effective way is define an External DLL fitting function, and call GNU Scientific Library to do integration in the DLL. We are now fine tuning the example, and will put it on File Exchange later. Now, I have sent this example to the email address in you profile.

Thanks
Larry
OriginLab
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000