---
name: "PGAMean"
section: "3"
platform: "linux"
package: "pgapack"
version: "1.0.0.1-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/PGAMean"
---

# PGAMean(3)

calculates the mean value of an array of elements

## NAME

PGAMean - calculates the mean value of an array of elements

## INPUT PARAMETERS

- ctx

  \- context variable

- a

  \- array to take the mean of

- n

  \- number of elements in array a

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
double  PGAMean(ctx, a, n)
PGAContext *ctx
double *a
int n
```

## LOCATION

utility.c

## EXAMPLE

```
Example:
PGAContext *ctx;
double a[100], mean;
:
mean = PGAMean(ctx, a, 100);
```
