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
 how to find intercepts of a straght line with mult
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

austin75

USA
8 Posts

Posted - 04/27/2011 :  3:53:30 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

Echo_Chu

China
Posts

Posted - 04/28/2011 :  05:47:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Austin

Please see whether this tutorial is what you need.

http://wiki.originlab.com/~originla/howto/index.php?title=Tutorial:Linear_Fitting

Echo
Go to Top of Page

austin75

USA
8 Posts

Posted - 04/28/2011 :  09:50:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.

Edited by - austin75 on 04/28/2011 09:58:20 AM
Go to Top of Page

easwar

USA
1964 Posts

Posted - 04/28/2011 :  11:09:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

austin75

USA
8 Posts

Posted - 04/28/2011 :  11:30:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for all who responded. Hope to see this feature in newer version. :)
Go to Top of Page

larry_lan

China
Posts

Posted - 04/28/2011 :  9:30:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

austin75

USA
8 Posts

Posted - 04/29/2011 :  11:56:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.

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