SignalUtils.AmpltToLog Method

Double AmpltToLog(TDenseMtxVec Data, Double Base, Double Span, Double aMax, Double aScale, Boolean Normalized)

Convert amplitude to logarithmic scale.

#NameTypeDescription
1DataTDenseMtxVecsource TVec or TMtx
2BaseDoublescalar
3SpanDoublescalar
4aMaxDoublescalar
5aScaleDoublescalar
6NormalizedBoolean

Returns: Double

Remarks:

Applies logarithm to Data. Base is the base of the logarithm and should be 10, if decibels are desired. The logarithm is then scaled by aScale according to the formula LogN(Base,Value)*aScale. Span defines the dynamic range on the left axis. If aScale is 20 and base is 10, the Span is in dB. The values below -span will be clipped. If Normalized is True, the maximum will be set to zero and minimum to -Span. The function returns -Span.