# rmse

## Syntax

## Description

returns the root-mean-square
error (RMSE) between the forecast (predicted) array `E`

= rmse(`F`

,`A`

)`F`

and the
actual (observed) array `A`

.

`F`

and`A`

must either be the same size or have sizes that are compatible.If

`F`

and`A`

are vectors of the same size, then`E`

is a scalar.If

`F-A`

is a matrix, then`E`

is a row vector containing the RMSE for each column.If

`F`

and`A`

are multidimensional arrays, then`E`

contains the RMSE computed along the first array dimension of size greater than 1, with elements treated as vectors. The size of`E`

in this dimension is 1, while the sizes of all other dimensions are the same as in`F-A`

.

specifies whether to include or omit `E`

= rmse(___,`nanflag`

)`NaN`

values in `F`

and `A`

for any of the previous syntaxes. For example,
`rmse(F,A,"omitnan")`

ignores `NaN`

values when
computing the RMSE. By default, `rmse`

includes `NaN`

values.

specifies a weighting scheme `E`

= rmse(___,Weight=`W`

)`W`

and returns the weighted RMSE. If
`W`

is a vector, its length must equal the length of the operating
dimension. If `W`

is a matrix or multidimensional array, it must have the
same dimensions as `F`

, `A`

, or `F-A`

.
You cannot specify a weighting scheme if you specify `vecdim`

or
`"all"`

.

## Examples

## Input Arguments

## More About

## Extended Capabilities

## Version History

**Introduced in R2022b**