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
 Fit data where y is independent variable

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
sestes Posted - 12/09/2011 : 8:42:26 PM
I would like to fit the following data:

x,y
18.52421, 2
27.62332, 4
9.07731, 6
4.29332, 8
14.93523, 10
4.89243, 12
10.43479, 14
6.50662, 16
0.66017, 18
2.73978, 20.875

using the function x = (a*exp(-s*y)) + b (y is the independent variable). I added this equation correctly as a non-linear user defined function. If I perform a least-squares analysis manually, the calculated S parameter is 0.249. However, if I use the user defined function, the fit calculated in Origin is incorrect. If I plot the data traditionally with x as the independent variable, and use the built in exponential function (which agrees with my defined function), I get a correct fit. Why am I unable to fit the data with y as the independent variable?

Thanks!
3   L A T E S T    R E P L I E S    (Newest First)
sestes Posted - 12/12/2011 : 11:40:32 PM
Hi Hideo ... again -

I just found a nifty feature ... "exchange x-y axes" under the graph menu. I can fit the data in the traditional way ... independent variable on the x-axis and then exchange the axes. This give me exactly what I was looking for. Thanks for your help!
sestes Posted - 12/12/2011 : 11:14:18 PM
Hi Hideo,

Thanks for the reply. The solution you showed in your reply is what I ended up using. However, what I'd really like is to have the fitted data plotted with the independent variable on the vertical axis. The reason is that the y-data given in my original post represents depth, so it is easier to visualize depth dependent changes when depth is plotted vertically. I can get a fit to converge when the is data plotted in this manner, but the fit is incorrect. You stated that having the x-axis as the independent variable is "by design" -- which is the norm in the scientific community anyway. However, do you think there is any way of getting around this?



Shanna
Hideo Fujii Posted - 12/12/2011 : 5:05:45 PM
Hi sestes,

If you fit directly from a worksheet, it shouldn't matter - just a matter which column is independent, and which is dependent. If you want to fit from a plot, the situation should be the same - just a matter of the assignment of the in/dependent variables to the datasets.
However, if you want to add the fitted curve (result) on the original graph, your input data plot should be arranged as independent variable for the horizontal axis, dependent for the vertical axis. I think this is by design.



I hope this answers to your question.

--Hideo Fujii
OriginLab

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