5 February 2008 2:51:15.025 PM WHERE_TEST FORTRAN90 version. Demonstrate the use of the WHERE statement. The matrix is of dimension : 10 10 In the printout, no more than 5 rows and columns will be shown. Initial matrix A: 1 2 3 4 5 1 3.00000 -2.00000 2.00000 1.00000 1.00000 2 0.00000 -2.00000 -1.00000 1.00000 0.00000 3 3.00000 2.00000 -2.00000 2.00000 3.00000 4 1.00000 -1.00000 3.00000 1.00000 2.00000 5 -1.00000 0.00000 1.00000 -2.00000 1.00000 Where A nonzero, A = 2 / A: 1 2 3 4 5 1 0.666667 -1.00000 1.00000 2.00000 2.00000 2 0.00000 -1.00000 -2.00000 2.00000 0.00000 3 0.666667 1.00000 -1.00000 1.00000 0.666667 4 2.00000 -2.00000 0.666667 2.00000 1.00000 5 -2.00000 0.00000 2.00000 -1.00000 2.00000 Where A positive, A = Sqrt ( A ), Elsewhere A = - A**2. 1 2 3 4 5 1 0.816497 -1.00000 1.00000 1.41421 1.41421 2 -0.00000 -1.00000 -4.00000 1.41421 -0.00000 3 0.816497 1.00000 -1.00000 1.00000 0.816497 4 1.41421 -4.00000 0.816497 1.41421 1.00000 5 -4.00000 -0.00000 1.41421 -1.00000 1.41421 Where |A| <= 1, A = arcsin ( A ): 1 2 3 4 5 1 0.955317 -1.57080 1.57080 1.41421 1.41421 2 -0.00000 -1.57080 -4.00000 1.41421 -0.00000 3 0.955317 1.57080 -1.57080 1.57080 0.955317 4 1.41421 -4.00000 0.955317 1.41421 1.57080 5 -4.00000 -0.00000 1.41421 -1.57080 1.41421 WHERE_TEST: Normal end of execution. 5 February 2008 2:51:15.027 PM