T O P I C R E V I E W |
DerekK |
Posted - 03/18/2016 : 1:17:57 PM 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 |
1 L A T E S T R E P L I E S (Newest First) |
Hideo Fujii |
Posted - 03/18/2016 : 5:20:08 PM 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 |
|
|