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
 LabTalk Forum
 Output the XYY fitted curve
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

goulven999

Japan
3 Posts

Posted - 03/01/2018 :  10:01:28 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release: 9.0.0 (32bit)
Operating System: windows

My model use a complex equation and use the real part as y1 and the imaginary part as y2 for my fitting.

complex cc =Xadia+Xiso1/((1+(1i*2*pi*x*Tau1)^(1-Alpha1))^(Beta1));
y1 = cc.m_re;
y2 = -cc.m_im;

I can successfully fit a XYY dataset with the nlbeginr/nlfit/nlend
and obtain the fitting parameter.

My problem is to obtain the fitted curve.
Using the

fity=fit(fitx);

I can obtain the y1 value, and extract it to a new sheet, but I don't know how to obtain the y2 value.

Thank you

yuki_wu

896 Posts

Posted - 03/05/2018 :  02:52:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can get the fitted curve of y2 by specifying the index, for example:

fity2 = fit(fitx, 2);

Please refer to this example:
https://www.originlab.com/doc/LabTalk/ref/Fit-func

Hope it helps.

Regards,
Yuki
OriginLab
Go to Top of Page

goulven999

Japan
3 Posts

Posted - 03/05/2018 :  06:41:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your help

I tried it but I get some error of range declaration.

I find an other solution:
first I generate the x value in a logarithm scale, then recalculate the imaginary and real part with the parameter obtain from the fitting. It work very well and I can control the lowest and highest X, as well as the number of point

csetvalue col:=Col(1) formula:=(10^((data(0, 1, 0.005))*7)/100);
csetvalue col:=col(2) formula:="imreal(Xadia+Xiso1/((1+(1i*2*pi*Col(1)*Tau1)^(1-Alpha1))^(Beta1))";
csetvalue col:=col(3) formula:="-imaginary(Xadia+Xiso1/((1+(1i*2*pi*Col(1)*Tau1)^(1-Alpha1))^(Beta1))";

Regards
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