Learn R Programming

matlab2r (version 1.5.0)

zeros_or_ones: Matrix of zeros or ones

Description

Generates a square or rectangular matrix of zeros or ones

Usage

zeros_or_ones(n, x)

Value

n-by-n matrix filled with 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