# ARTS built-in documentation server

## Workspace Method covmatDiagonal

### Description

Sets the matrix in covmat_block to a diagonal matrix with the variances
provided in *vars* as diagonal elements.
Also sets covmat_block_inv to the inverse of the block so that the
computation of the inverse is avoided.

**Authors: **Simon Pfreundschuh

### Synopsis

covmatDiagonal( | out, out_inverse, vars ) |

### Variables

GOUT | out | (Matrix, Sparse) | The matrix in which to store the covariance matrix. |

GOUT | out_inverse | (Matrix, Sparse) | The matrix in which to store the inverse of the covariance matrix. |

GIN | vars | (Vector) | Variances to be used as diagonal elements of covmat_block. |