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
 All Forums
 Origin Forum
 Origin Forum
 Nonlinear fitting with complex number

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jayantkolte 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



3   L A T E S T    R E P L I E S    (Newest First)
wzm39 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

jayantkolte 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
jasonzhao 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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000