T O P I C R E V I E W |
austin75 |
Posted - 04/27/2011 : 3:53:30 PM Origin Ver. and Service Release (Select Help-->About Origin): 8.0 SR1 Operating System: Win7 64 bit
Hi,
I have a xyplot with several curves. Now I want to find the intercepts coordinates of these curves and a straight line, say y=a*x+b (a and b are both constant). What should I do? Thanks.
A.S. |
6 L A T E S T R E P L I E S (Newest First) |
austin75 |
Posted - 04/29/2011 : 11:56:35 AM Hi Larry,
I just tried the Script Tool with a simple test dataset. First, I created an new workbook with three columns. For each column, I set column value as i, cos(i), and constant 0.3 for column A, B and C respectively. Then I plot the B and C columns vs A. As expected, there should be several intersects for cos curve B and straight line C. Next, I run the Script Tool with DataIntersect script chosen. After click run button, I put initial variables as shown in the fig. Click Ok. the result shows as in the fig. There is only one correct intersect point in the report. That means, this tool needs some improvement.
Thanks.
A.S.
|
larry_lan |
Posted - 04/28/2011 : 9:30:40 PM Hi A.S:
Before we release the new tool, maybe you can try an old Script Tool?
http://www.originlab.com/fileexchange/details.aspx?fid=28
This tool was supported in 7.5. We are not sure if it 100% works in 8.0. I just did a simple test on 8.0 SR6, and it looks work fine.
There is an DataIntersect option in this Script Tool, which calculate intersection between two curves. Now that you have many curves, maybe you need to run the tool many times... I know it's unfriendly. This is the only tool we have now. Or, you can modify the script by yourself.
Hope this helps.
Thanks Larry OriginLab |
austin75 |
Posted - 04/28/2011 : 11:30:19 AM Thanks for all who responded. Hope to see this feature in newer version. :) |
easwar |
Posted - 04/28/2011 : 11:09:05 AM Hi A.S.,
We have had request for this from other customers as well, so we plan to add a tool soon.
Until such tool is available, you can try writing LabTalk Script or Origin C code to find the intersection.
Easwar OriginLab |
austin75 |
Posted - 04/28/2011 : 09:50:02 AM Thanks Echo. However, I don't think this question is related to linear fitting.
I may need to rephrase my question here. I have a single layer xyplot contains several curves, for example curve 1, curve 2 and curve 3. Now I have a straight line with form "y=a*x+b". This straight line may or may not crossing these curves. If it is crossing any of the curves, then how to find the coordinates for each crossing points? And some curves may have more than one crossing points with this straight line. How to determine them quickly? In my real task, I have more than 20 curves and more than 20 straight lines. So the number of crossing points will be huge. Any idea will be appreciated. Thanks.
A.S. |
Echo_Chu |
Posted - 04/28/2011 : 05:47:01 AM Hi, Austin
Please see whether this tutorial is what you need.
http://wiki.originlab.com/~originla/howto/index.php?title=Tutorial:Linear_Fitting
Echo |
|
|