% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/matrix.utils.R
\name{set_diag}
\alias{set_diag}
\title{Return the matrix with diagonal set to a specified value}
\usage{
set_diag(x, value)
}
\arguments{
\item{x}{a square matrix.}

\item{value}{a value or a vector (recycled to the required length).}
}
\description{
This function simply assigns \code{value} to diagonal of \code{x} and returns
\code{x}.
}
