Author |
Topic |
|
jayantkolte
India
Posts |
Posted - 08/22/2014 : 04:51:12 AM
|
Originpro 9.1 Service Release: sr3 b275 Operating System:Windows 7 Hello everybody, I have a complex fitting function called as Cole Cole equation. Since it has complex number i, I am not able to compile it using origin C. Below is my function.
y = Ei+(Es-Ei)/ 1+((i*2pi*x*t)^(1-a))
and my C code is void _nlsfColecole( // Fit Parameter(s): double a, double t, double Es, double Ei, // Independent Variable(s): double x, // Dependent Variable(s): double& y) { // Beginning of editable part complex yo; yo =1+((1i*6.28*x*t)^(1-a)); y= (Ei+(Es-Ei))/yo; // End of editable part }
It gives me error as Incompatible variable types in expression on line where y is written. I search in forum, help and tutorials for help but but not able to resolve this error.
Kindly help me in this regard.
Thanking you in advance, Jayant
|
|
jasonzhao
China
262 Posts |
Posted - 08/22/2014 : 07:25:30 AM
|
Hello,
For fitting complex function, we use Origin C to build a user defined function in Fitting Function Builder, please refer to this link for details: http://www.originlab.com/doc/Tutorials/Fitting-ComplexFunc
You can also refer to the graph below which gives a example for cole-cole fitting:
If you still have diffculties for complex fitting, send your data to tech@originlab.com is recommended.
Best regards, Jason Zhao OriginLab Tech Service |
Edited by - jasonzhao on 08/22/2014 09:23:36 AM |
|
|
jayantkolte
India
Posts |
Posted - 08/22/2014 : 09:46:45 AM
|
Dear Jason Thank you very much for your reply. I do exactly as suggested by you and got the result as required.
Regards, Jayant |
|
|
wzm39
USA
6 Posts |
Posted - 03/01/2021 : 1:30:08 PM
|
Hi Jason, thanks very much for your reply!!! I tried different ways to fit complex functions, for some reasons only your answer worked!! Thanks a lot for such a detailed answer!
Hope this answer can also be added in origin Tutorials. I noticed that many people ask about fitting complex functions!
Thanks again!!!
quote: Originally posted by jasonzhao
Hello,
For fitting complex function, we use Origin C to build a user defined function in Fitting Function Builder, please refer to this link for details: http://www.originlab.com/doc/Tutorials/Fitting-ComplexFunc
You can also refer to the graph below which gives a example for cole-cole fitting:
If you still have diffculties for complex fitting, send your data to tech@originlab.com is recommended.
Best regards, Jason Zhao OriginLab Tech Service
|
|
|
|
Topic |
|
|
|