averageMatrices: Average matrices

View source: R/modulationSpectrum.R

averageMatricesR Documentation

Average matrices

Description

Internal soundgen function.

Usage

averageMatrices(mat_list, rFun = "max", cFun = "median", reduceFun = "+")

Arguments

mat_list

a list of matrices to aggregate (eg spectrograms or modulation spectra)

rFun,

cFun functions used to determine the number of rows and columns in the result

aggFun

function used to aggregate

Details

Takes a list of matrices (normally modulation spectra), interpolates them to have the same size, and then reduces them (eg takes the average).

Examples

mat_list = list(
  matrix(1:30, nrow = 5),
  matrix(80:17, nrow = 8)
)
soundgen:::averageMatrices(mat_list)
soundgen:::averageMatrices(mat_list, cFun = 'max', reduceFun = '*')

soundgen documentation built on Aug. 14, 2022, 5:05 p.m.