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 for Programming
 LabTalk Forum
 Output the XYY fitted curve

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
goulven999 Posted - 03/01/2018 : 10:01:28 PM
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
2   L A T E S T    R E P L I E S    (Newest First)
goulven999 Posted - 03/05/2018 : 06:41:58 AM
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
yuki_wu Posted - 03/05/2018 : 02:52:15 AM
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

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