Elementary Principles 15 - 2.43 yi = axi (a ) = a= i =1 n...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
2- 15 2.43 ya x a d x d da x x y xax ay xx ii i i n i n i n i i n i i n i n i i n =⇒ = = ⇒= = = == = = = ∑∑ φ () / 2 1 2 11 1 2 1 1 2 1 02 0 bg 2.44 DIMENSION X(100), Y(100) READ (5, 1) N C N = NUMBER OF DATA POINTS 1FORMAT (I10) READ (5, 2) (X(J), Y(J), J = 1, N 2FORMAT (8F 10.2) SX = 0.0 SY = 0.0 SXX = 0.0 SXY = 0.0 DO 100J = 1, N SX = SX + X(J) SY = SY + Y(J) SXX = SXX + X(J) ** 2 100SXY = SXY + X(J) * Y(J) AN = N SX = SX/AN SY = SY/AN SXX = SXX/AN SXY = SXY/AN CALCULATE SLOPE AND INTERCEPT A = (SXY - SX * SY)/(SXX - SX ** 2) B = SY - A * SX WRITE (6, 3) 3FORMAT (1H1, 20X 'PROBLEM 2-39'/) WRITE (6, 4) A, B 4FORMAT (1H0, 'SLOPE b -- b
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/27/2012 for the course CHEMICAL E 312 taught by Professor Cheung during the Fall '11 term at The University of Akron.

Ask a homework question - tutors are online