VRfAmpldB


Routine

void VRfAmpldB (const float ampl[], float dB[], int N)

Purpose

Convert each value in an array of amplitudes to a decibel value

Description

This routine converts the elements of an array of amplitudes to decibels.
  dB[i] = 20 * log10(ampl[i]),  0 <= i < N.
The value ampl[i] must be non-negative. If ampl[i] is zero, dB[i] is set to
-1e6 (with a warning).

Parameters

-> const float ampl[]
Input amplitude array (N elements). This values must be non-negative.
<- float y[]
Output array of decibel values (N elements). The output array can be the same as the input array.
-> int N
Number of elements in the arrays (may be zero)

Author / revision

P. Kabal Copyright (C) 1996 / Revision 1.5 1996/05/06

See Also

VRfLog10


Main Index libtsp