zeros_or_ones: Matrix of zeros or ones

View source: R/zeros_ones.R

zeros_or_onesR Documentation

Matrix of zeros or ones

Description

Generates a square or rectangular matrix of zeros or ones

Usage

zeros_or_ones(n, x)

Arguments

n

scalar or 2D vector

x

value to fill matrix with

Details

This is a wrapper function to replicate the behavior of the zeros() and the ones() functions on Matlab

Value

n-by-n matrix filled with x

Note

Actually works for any x, but there's no need to bother imposing validation controls here.


matlab2r documentation built on Feb. 16, 2023, 10:39 p.m.