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
 Multiple Data Range Linear Fitting

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
onesun Posted - 01/08/2010 : 7:58:57 PM
Hello!
I am seeking an elegant way to linearly fit two different data ranges on the same set of (x,y) data, with the end goal of determining the x value at their intercept. At best right now all I can do is go through two separate linear fitting processes using the data range selector tool and then finding the intercept by hand after Origin provides me with the slopes and y-intercepts. Any suggestions? Thanks!
Yours in data processing,
-Kevin
2   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 01/11/2010 : 11:05:43 AM
Hi Kevin,

If you just want to compute/print out the x value for the intersection (and not necessarily want it as part of the fit report), you could use a script solution such as below:

First plot your data and use the Regional Data Selector tool from the Tools menu to select/mark two ranges on your data.

Then run the following script:


nlbegin func:=line nlt:=mytree;
nlfit;
nlend 1;
double a1,b1,a2,b2;
a1=mytree.a;
b1=mytree.b;
a2=mytree.a_2;
b2=mytree.b_2;
double myx=(a2-a1)/(b1-b2);
type "The two lines intersect at x=$(myx)";


You can look up documentation on nlfit, nlend etc in the LT Guide for version 8.1 in the product, or from this wiki area:
http://wiki.originlab.com/~originla/wiki/index.php?title=Category:LabTalk_Programming

Also once a fit has been done, there is a getnlr X-function that can be used to programmatically get all information from a report sheet.

Easwar
OriginLab
larry_lan Posted - 01/11/2010 : 02:22:21 AM
Hi Kevin:

You can only add another data range in the fitter, and fit at the same time. However, you still need to select the data from each range manually.



As for calculating the intercepts, you can use Derived Parameters to calculate that, which was supported in Nonlinear Curve Fitting dialog only.

Thanks
Larry
OriginLab Technical Services

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