next up previous contents
Next: Solution Up: Arrays Previous: Solution

 

Operations on arrays and array intrinsics

Declare a constant arrays A and X where:

displaymath2894

displaymath2895

 
     		a) 		Using the relevant intrinsics set M and N to be the extents of A

b) Print the array A out row by row,

c) Write a Fortran 90 program which use intrinsics to print out the following:

i) The sum of the product of the columns of A (use intrinsics)

ii) The product of the sum of the row elements of A (use intrinsics)

iii) The sum of squares of the elements of X

iv) The mean of the elements of X

v) The sum of the positive elements of X

vi) The infinity norm of X i.e. the largest of ( tex2html_wrap_inline2898 )

vii) The one norm of A i.e. the largest column sum of tex2html_wrap_inline2900




next up previous contents
Next: Solution Up: Arrays Previous: Solution

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 14:10:26 GMT 1996