Accelerating the pace of engineering and science

# Documentation Center

• Trial Software
• Product Updates

# stats::quadraticMean

Quadratic mean of a data sample

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```stats::quadraticMean(x1, x2, …)
stats::quadraticMean([x1, x2, …])
stats::quadraticMean(s, <c>)
```

## Description

stats::quadraticMean(x1, x2, …, xn) returns the quadratic mean

of the data xi.

The column index c is optional, if the data are given by a stats::sample object containing only one non-string column. Cf. Example 3.

External statistical data stored in an ASCII file can be imported into a MuPAD® session via import::readdata. In particular, see Example 1 of the corresponding help page.

## Examples

### Example 1

We calculate the quadratic mean of three values:

`stats::quadraticMean(a, b, c)`

Alternatively, data may be passed as a list:

`stats::quadraticMean([2, 3, 5])`

### Example 2

We create a sample:

`stats::sample([[a1, b1, c1], [a2, b2, c2]])`
```a1  b1  c1
a2  b2  c2
```

The quadratic mean of the second column is:

`stats::quadraticMean(%, 2)`

### Example 3

We create a sample consisting of one string column and one non-string column:

`stats::sample([["1996", 1242], ["1997", 1353], ["1998", 1142]])`
```"1996"  1242
"1997"  1353
"1998"  1142
```

We compute the quadratic mean of the second column. In this case this column does not have to be specified, since it is the only non-string column:

`float(stats::quadraticMean(%))`

## Parameters

 x1, x2, … The statistical data: arithmetical expressions. s A sample of domain type stats::sample. c An integer representing a column index of the sample s. This column provides the data x1, x2 etc.

## Return Values

arithmetical expression.

## See Also

### MuPAD Functions

Was this topic helpful?