sum_MATLAB {matlab2r}R Documentation

Sum of array elements

Description

Returns the sum of the elements of the first input

Usage

sum_MATLAB(A, dim)

## S4 method for signature 'array,missing'
sum_MATLAB(A)

## S4 method for signature 'array,character'
sum_MATLAB(A, dim)

## S4 method for signature 'array,numeric'
sum_MATLAB(A, dim)

Arguments

A

vector, matrix or array

dim

dimention over which A is to be summed

Value

The total, row or column sum of A

Methods (by class)

Author(s)

Waldir Leoncio

Examples

x1 <- array(1:9, c(3, 3))
sum_MATLAB(x1)
sum_MATLAB(x1, "all")
sum_MATLAB(x1, 2)

[Package matlab2r version 1.5.0 Index]