array_operator {IGCities}R Documentation

Array operator to mimic different-dimension-array element-wise operations in MATLAB. It receives as input two arrays of potentially different dimensions, it resizes them to have same dimensions and finally performs the element-wise operation.

Description

Array operator to mimic different-dimension-array element-wise operations in MATLAB. It receives as input two arrays of potentially different dimensions, it resizes them to have same dimensions and finally performs the element-wise operation.

Usage

array_operator(array1, array2, operation)

Arguments

array1

The first array

array2

The second array

operation

The operation. It can take values: '+', '-', '*', '/' and '^'

Value

An array with dimensions equal to the "largest" input array. It is the result of applying the operator element-wise to both input arrays.


[Package IGCities version 0.2.0 Index]