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
 NLSF of two equations simultaneously?

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
dkharas Posted - 07/19/2004 : 3:41:27 PM
Hi I am sort of new to doing NLSF fitting on Origin.
I have 3 columns of data:
VarA, Xexp, Yexp. Where Y is plotted vs. X. and VarA is a variable.

Iam interested in fitting a user defined equation to Xexp and Yexp
by defining two equations which are not a function of each other.

X=f(VarA,P1,P2,P3) where Var A is the variable in column 1 and P1, P2, P3 are fitting parameters,
and Y=f(VarA,P1,P2,P3).

Is there a way to do this in origin?

I previusly plotted X vs VarA, and then was able to fit X to the data, and repeated it for Y vs. VarA. However, the NLSF then generates different fitting parameters P1,P2,P3 for both equations. I want the fitting routine to use the same parameters for both equations simultaneously.
3   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 07/22/2004 : 10:25:05 AM
Hi Dave,

The problem you are facing is that even though NLSF performs the fit correctly to multiple dependent variables with one independent variable, the plot that it uses to show the fit lines is each dependent variable plotted separately against the independent variable. You are looking to plot the dependent variables against each other while fitting. This is currently not possible.

So I would suggest setting column A designation to X (even though disregard seems to work), and cols B and C designation to Y, and assign the datasets as you do now, and just perform the fit without worrying about the default plot that NLSF uses. Once the fit has convered, you can examine if the values generated are sensible, and try making other types of plot to examine the fit quality.

Easwar
OriginLab

dkharas Posted - 07/21/2004 : 5:26:14 PM
Thanks for the feedback, but Iam still having some difficulties.

1. I set Column A (which is my variable A) with Plot designation: "Disregard", and Column B(x) and c(Y) with X and Y designations.
2. I then highlight column B and C, and Plot them.
Generating a graph with (Data1: B(x),C(y))
so far so good.

3. Then I go to NLSF fitting routine,
and select my fitting function which looks as follows:
user defined
parameters: 2
Parameter names: P1,P2
indep var: A=Data1_A
dependant var: x,y
x=P1/(1+(A*P1*P2)^2);
y=P1*((A*P1*P2)/(1+(A*P1*P2)^2))
set form to equations (ive tried this with expressions, and y script as well).

4. Then I select the data: This is where things get a little confusing.
Dataset:
x Dep Data1_B 1..801
y Dep Data1_C 1..801
-->A Indep Data1_A 1..801

5. as soon as i set the data, the graph automatically
replots everything as A vs. B and C.
layer1-> Data1: A(X),C(Y)
-> Data1: A(X),B(Y)

6. at this point what ive been doing is deleting the
graph, and going back to replot the B and C coumns as in step 2.

7. with the graph replotted as C vs. B, I go back to the
curve fitting window, which I havent closed assuming that the data is
correctly set. I proceed to the fitting.

8. the fit routine performs 100 iterations, and outputs a curve
that does not appear to match the data. When i examine the plot
there are two fits added.

layer1-> Data1: B(X),C(Y)
-> yfit1: 1 (1 column of data (x))
-> yfit2: ( 2 columns of data B(X), (Y) )

I ve assumed that the data in Yfit1 corresponds to my Xdata
and the data in Yfit2 corresponds to the Y data.
is this a correct assumption? is there a way for the output
fit data to be plotted correctly as x and y, or do i have
to copy and paste y fits into 2 new x and y columns and replot them?

is this fitting formula set up correctly to do what I want?

thanks again.

dave





quote:

Hi I am sort of new to doing NLSF fitting on Origin.
I have 3 columns of data:
VarA, Xexp, Yexp. Where Y is plotted vs. X. and VarA is a variable.

Iam interested in fitting a user defined equation to Xexp and Yexp
by defining two equations which are not a function of each other.

X=f(VarA,P1,P2,P3) where Var A is the variable in column 1 and P1, P2, P3 are fitting parameters,
and Y=f(VarA,P1,P2,P3).

Is there a way to do this in origin?

I previusly plotted X vs VarA, and then was able to fit X to the data, and repeated it for Y vs. VarA. However, the NLSF then generates different fitting parameters P1,P2,P3 for both equations. I want the fitting routine to use the same parameters for both equations simultaneously.

easwar Posted - 07/19/2004 : 4:42:55 PM
Hello,

What you are looking for is to fit multiple dependent variables simultaneously. This is possible. When defining the new function in NLSF, enter one name/variable for the Indep Var and two names/variables for the Dependent vars. Then in the function edit box you can specify both equations and have them share the same parameters. Then you can assign your 1st column to the indep var and the 2nd and 3rd cols to the two dependent vars and Origin will fit the data in 2nd and 3rd columns simultaneously.

If you run into problems, please post again, or just contact tech support for further help.

Easwar
OriginLab



Edited by - easwar on 07/19/2004 4:43:34 PM

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