PC Review


Reply
Thread Tools Rate Thread

Calulating a point on a line

 
 
Curbie
Guest
Posts: n/a
 
      1st Jul 2011
I'm trying to calculate some steps or stages for a graph and am having
trouble, basically I'm trying to calculate a line between a point x,y
to a point on a line between x1,y1 and x2,y2 that looks some like
this:

.x2,y2(8,6)
/
/-----------------------------------x,y(13,3)
/
.x1,y1(1,1)

I think I got the slope 5/7=0.7142857, but I'm looking for the
equation to calculate line between a point x,y to a point on a line
between x1,y1 and x2,y.

Go easy on me, I haven't been to school in 35 years.

 
Reply With Quote
 
 
 
 
joeu2004
Guest
Posts: n/a
 
      1st Jul 2011
"Curbie" <(E-Mail Removed)>:
> I'm trying to calculate some steps or stages for
> a graph and am having trouble, basically I'm trying
> to calculate a line between a point x,y to a point
> on a line between x1,y1 and x2,y2


If X1:X2 contains 1 and 8 (x1 and x2) and Y1:Y2 contains 1 and 6 (y1 and
y2), you can compute:

Z1: =SLOPE(Y1:Y2,X1:X2)
Z2: =INTERCEPT(Y1:Y2,X1:X2

Then for any X (in X3), the corresponding Y is:

=Z1*X3+Z2

Or more simply:

=FORECAST(X3,Y1:Y2,X1:X2)

 
Reply With Quote
 
Curbie
Guest
Posts: n/a
 
      1st Jul 2011
Joe,

Oh cool, I didn't realize Excel had built-in SLOPE, INTERCEPT, and
FORECAST functions, I was calculating them with VBA, slope = (y2 - y1)
/ (x2 - x1) and intercept =m(x - x1) + y1

Thanks for your time and help.

On Fri, 1 Jul 2011 12:39:20 -0700, "joeu2004" <(E-Mail Removed)>
wrote:

>"Curbie" <(E-Mail Removed)>:
>> I'm trying to calculate some steps or stages for
>> a graph and am having trouble, basically I'm trying
>> to calculate a line between a point x,y to a point
>> on a line between x1,y1 and x2,y2

>
>If X1:X2 contains 1 and 8 (x1 and x2) and Y1:Y2 contains 1 and 6 (y1 and
>y2), you can compute:
>
>Z1: =SLOPE(Y1:Y2,X1:X2)
>Z2: =INTERCEPT(Y1:Y2,X1:X2
>
>Then for any X (in X3), the corresponding Y is:
>
>=Z1*X3+Z2
>
>Or more simply:
>
>=FORECAST(X3,Y1:Y2,X1:X2)


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
text insertion point changed from vertical line to point, yuk. Dave Thomas Microsoft Word Document Management 2 17th Sep 2008 12:50 PM
line chart question - Possible to make the line transition from pointto point via 95-degree angles? Mike C Microsoft Excel Discussion 2 19th Apr 2008 11:19 PM
Data point on line is not over the point/tick in X axis... =?Utf-8?B?VG9tQ2F0?= Microsoft Excel Charting 2 6th Sep 2007 01:36 PM
How to change color of line and point markers on a line graph =?Utf-8?B?U0FTUGVyc29u?= Microsoft Excel Charting 1 15th Nov 2006 06:43 PM
How do I resize the insertion point line (vertical line) in Word . =?Utf-8?B?Si5LLiBBdWd1c3Q=?= Microsoft Word Document Management 6 23rd Dec 2004 06:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:45 PM.