Skip to contents

This function takes two spectra from seewave (or equivalent) and adds their values. The spectra must have the same bins.

Usage

addSpectra(s1, s2, coerceNegative = "no")

Arguments

s1

First spectrum

s2

Second spectrum

coerceNegative

Sets any values below zero to zero, accepted values "input", "output" or "both".

Value

A spectrum of s1+s2

Examples

if (FALSE) {
addSpectra(spec1, spec2)
addSpectra(spec1, spec2, coerceNegative="input")
}