I woul'd like to use the Origin built-in fitting function ( for example Voigt function) in my external fitting function dll . Is this possible? If yes how can I do it?
As you probably know, you can execute any LabTalk from your DLL. This includes using any of the built-in functions.
First, you need to identify the formal name of the function by opening the Non-Linear Curve Fitter in Origin (select Analysis : Non-linear Curve Fit from the Origin menu). If you are not in Advanced Mode click the More button. Select your Category and Function from the lists and check the Function File radio button. Next to Function Source after "fgroup." you will find the function name. (In the case of Voigt, that name is Voigt5.) The number and order of parameters can be found in Names under the [FITTING PARAMETERS] section.
You can now use a string such as
col(2)=voigt5(col(1),13,17,122,13,6);
and execute it via a sendmessage( ). See the DLLDEMO.C file for an example.