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 |
|
|