Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Average of an array

onkelhotte
New Contributor II
4,390 Views

Hi there,

Im still using CVF6.6c and I was looking for a function that return the average of an array.

Though I didnt find a function, I tried to program a function on my own. But I have a problem with the array dimension and array type in the ne function. I have to create a new array but I dont know the dimensions nor type.

real function average(array)
implicit none
real array(:)

Thanks in advance,
Markus

0 Kudos
3 Replies
Jugoslav_Dujic
Valued Contributor II
4,390 Views

Erm, what's wrong with SUM()/SIZE() ?

0 Kudos
onkelhotte
New Contributor II
4,390 Views

Erm, nothing... That was only aquestion to test the expertise of the forum users :-)

I need a vacation...

0 Kudos
Jugoslav_Dujic
Valued Contributor II
4,390 Views
I need a vacation...

Tell me about it...
0 Kudos
Reply