*(literally: “How funny it is that we meet here.”) ]]>

I’m trying to do the same but with a fortran function. But it doesn’t work.

Any idea how i can do that?

real(kind=8) function meanFilter(arr, row, col)

integer, intent(in) :: row, col

integer, dimension(row,col), intent(in) :: arr

integer :: i, j, sum

sum = 0

do j=1, col

do i = 1, row

sum = sum + arr(i,j)

write(*,*) i, j, arr(i,j), sum

enddo

enddo

meanFilter = real(sum,8)/(row*col)

write(*,*) “mean=”, meanFilter

end function meanFilter