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
 Multi-Function fitting with different x axes

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
rhparker Posted - 01/20/2015 : 11:12:06 PM
Origin Ver. and Service Release (Select Help-->About Origin): 9.0.0 SR2 b87
Operating System: Windows 7 64-bit

This is a bit complicated, but the solution is probably really simple, so please bear with me. I have three datasets, with errorbars, each of which is supposed to be a sine wave. The datasets should have the same amplitude, yoffset, and frequency, but two of the datasets should be constrained to have equal and opposite phases. I'm trying to do this fitting in Origin. To be clear, these are the sets of equations:
yup = y0 + Amp*sin(2*pi/w*x+phidelta/2)
ydn = y0 + Amp*sin(2*pi/w*x-phidelta/2)
yoff = y0 + Amp*sin(2*pi/w*x+phi)

Now it seems to me that I can't simply do a global fit with shared parameters, with an additional constraint that two of the phases be equal and opposite, because Origin seems to make the error bars on the resulting phases be implausibly large. I already know the rough scale of the error bars of the fit parameters. So what I tried doing was making those three equations be my fit equation, and assigning each of the three datasets to be one of the output variables to fit. The fit worked, and gave parameters and error bars that are basically what I expected.

But here's where the problem comes in. I noticed that Origin wasn't using all my data for its fit--it was only using x-values where there were y-values for all three datasets. If, for example, I had taken a point for yup at X=3, but not for yoff, then the point at X=3 would not be included. I can tell this because of the number of points it says it used in the fit Log. So what I need to do is not only tell Origin which dataset should correspond to which output variable, but also which x-axis should be used for each dataset. And that's where I'm stuck. I've attached the screen I see in Origin--there's only one x-axis available to be selected.

This seems like it must be really simple to solve--it's just fitting three different datasets simultaneously, with each dataset having its own x-axis. Does anyone know how to do this? Thanks!




5   L A T E S T    R E P L I E S    (Newest First)
jasonzhao Posted - 01/22/2015 : 10:40:21 PM
Hello,

The Global Fit for Different Functions with Shared Parameters is designed for this kind of fitting:

Please create user defined fitting function like this:

y=yo + Amp*(s1*sin(2*pi/w*x+deltaphi/2)+s2*sin(2*pi/w*x-deltaphi/2)+s3*sin(2*pi/w*x+phi))


s1, s2 and s3 is used to control which parts of the fitting function is used.
This tutorial shows Global Fit for Different Functions with Shared Parameters step by step:
http://www.originlab.com/doc/Tutorials/Multi-Functions-Global-Fitting

In particular,
yo, amp, w, deltaphi should be shared
s1,s2,s3 should be fixed and set to 1 alternately.


Best regards,
Jason Zhao
OriginLab Tech Service
rhparker Posted - 01/22/2015 : 4:18:59 PM
I sent the files again.
jasonzhao Posted - 01/21/2015 : 9:25:08 PM
Hello,

Would you like to send the mail again?
Because you mail has not been received yet may be due to the transfer error.

Best regards,
Jason Zhao
OriginLab Tech Service
rhparker Posted - 01/21/2015 : 09:53:57 AM
Hi Jason,
I sent the files to that address. Thanks for helping me with this issue!
jasonzhao Posted - 01/21/2015 : 02:00:52 AM
Hello,

Would you please send your sample OPJ file for us to check?
As your image shown, a user defined fitting function is used, so send us the Sinusoidal7.fdf file (could be under user files folder such as \OriginLab\90\User Files\fitfunc) as well.
Please send to <tech@originlab.com>

Best regards,
Jason Zhao
OriginLab Tech Service

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