broadcast: Broadcasting an array to a wanted shape

Description Usage Arguments Value Note Author(s) Examples

Description

Extending a given array to match a wanted shape, similar to repmat.

Usage

1
broadcast(arr, dims)

Arguments

arr

Array to be broadcasted

dims

Desired output dimensions

Value

array of dimension dim

Note

# Fri Feb 9 14:41:25 2018 ——————————

Author(s)

Feng Geng (shouldsee.gem@gmail.com)

Examples

1
2
  M = array(1:12,dim=c(1,2,3))
  N = broadcast(M,c(4,2,3))

shouldsee/Rutil documentation built on May 27, 2019, 1:09 p.m.