28 lines
612 B
Text
28 lines
612 B
Text
|
|
% Generated by roxygen2: do not edit by hand
|
||
|
|
% Please edit documentation in R/zeros_ones.R
|
||
|
|
\name{zeros_or_ones}
|
||
|
|
\alias{zeros_or_ones}
|
||
|
|
\title{Matrix of zeros or ones}
|
||
|
|
\usage{
|
||
|
|
zeros_or_ones(n, x)
|
||
|
|
}
|
||
|
|
\arguments{
|
||
|
|
\item{n}{scalar or 2D vector}
|
||
|
|
|
||
|
|
\item{x}{value to fill matrix with}
|
||
|
|
}
|
||
|
|
\value{
|
||
|
|
n-by-n matrix filled with `x`
|
||
|
|
}
|
||
|
|
\description{
|
||
|
|
Generates a square or rectangular matrix of zeros or ones
|
||
|
|
}
|
||
|
|
\details{
|
||
|
|
This is a wrapper function to replicate the behavior of the
|
||
|
|
`zeros()` and the `ones()` functions on Matlab
|
||
|
|
}
|
||
|
|
\note{
|
||
|
|
Actually works for any `x`, but there's no need to bother imposing
|
||
|
|
validation controls here.
|
||
|
|
}
|