View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.charting
chris
 
Posts: n/a
Default interpolating non-linear curves in excel graphs


Bernard Liengme wrote:
Assuming that the points (all three of them!) lie on a straight line y= mx +
c
Let's say your know x's are in A1:A2 and known y's in B1:B2
m= SLOPE(y-values, x-values) so m =SLOPE(B1:B2,A1:A2) (put this in C1)
c = INTERCEPT(y-values, x-values) so c = INTERCEPT(B1:B2,C1:C2) (put this in
C2)
With x3 in A3, in B3 use =C1*A3+C2

or:
y1 = mx1 + c
y2 = mx2 + c
m = (y2-y1)/(x2-x1)
c = ((y2-y1)-(x2+x1)(y2-y1)/y2-y1))/2
y3 = x3(y2-y1)/(x2-x1) + ((y2+y1)-(x2+x1)(y2-y1)/(y2-y1))/2

Remember all that great Grade 10 algebra?
best wishes

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"chris" wrote in message
oups.com...
I'm generally quite happy with how excel graphs the moderately
non-linear x-y data I supply it - the curves pass through all the data
points with a pleasing fit.

I'd just like to be able to get excel to interpolate on the graph for
me. For instance, the curve passes through the points (x1, y1) and
(x2, y2) which I supplied. How do I get excel to calculate and supply
the value y3 from the point (x3, y3) on the curve it generated when I
specify the value of x3?