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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Find section of curve that is flattest
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

DerekK

USA
14 Posts

Posted - 03/18/2016 :  1:17:57 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello
I want to have my analysis template find the section of a curve that is best fit by a horizontal line. Or in other words... At what Y value does the curve spend the most time (in a contiguous section)?
The Y intercept of the linear fit would be the output.

Like the linear fit gadget, but with the slope constrained at 0. User could select min tolerance of fit (i.e. what R-squared value is good enough to consider it a flat line.)

Also would be useful for vertical line (slope = inf, find X-intercept of longest section of most vertical.).

Thanks, Derek

Origin Ver. and Service Release (Select Help-->About Origin): 2015 SR2. Operating System: Win 7

Hideo Fujii

USA
1582 Posts

Posted - 03/18/2016 :  5:20:08 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Derek,

You can define a user-defined function, say hline which is:
y=A+x*0
Once you define this, in Quick Fit gadget, you can add this function to the list of selectable functions
by "Change Function: More..." flyout, "Add" button in the "Edit Quick Fit Function List" dialog to add
hline to your repertoire. Now, you can use hline in the Quick Fit tool to explore the flattest segment
within the curve. If you desire, you can show the reduced/adjusted R-square on top of the ROI box.

Regarding the vertical part, you can switch X and Y to make a plot, then apply hline.

Does this help you?

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 03/18/2016 5:22:04 PM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000