Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TVec *RemoveDC(TVec *SrcDst, int Index, int Len = MtxVecEOA); | Remove the DC component. |
| 2 | TVec *RemoveDC(TVec *SrcDst); | In-place version of the RemoveDC method. |
| 3 | void RemoveDC(TVec *Src, TVec *Dst); | Not-In-place version of the RemoveDC method. |
| 4 | void RemoveDC(TVec *Src, TVec *Dst, int SrcIndex, int DstIndex, int Len = MtxVecEOA); | Not-in-place version of the RemoveDC method with source and destination indexes. |
Overload 1: TVec *RemoveDC(TVec *SrcDst, int Index, int Len = MtxVecEOA);
Remove the DC component.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | SrcDst | TVec * | |
| 2 | Index | int | |
| 3 | Len = MtxVecEOA | int |
Remarks:
Subtract the mean value of Data from Data. Works for stationary signals. Use a highpass FIR filter for signals with varying mean value or call the DcFilter routine, for an IIR version of the DC filter. Removing the DC component without applying a true FIR
or IIR filter is often convinient prior to frequency analysis, because there is no run-in or run-out and no filter delay.
Examples
#include "MtxExpr.h"
#include "Units.SignalUtils.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Signal;
using namespace Dew::Signal::Units::SignalUtils;
void Example()
{
Vector b(0);
Vector c(0);
Vector Response1(0);
Vector Response2(0);
Tone(b, 256, 6.0 / 256, 0, 1, false);
b = b + 4;
c.Copy(b);
RemoveDC(b);
FrequencyResponse(c, nullptr, Response1, 1, true, TSignalWindowType::wtRectangular, 0);
FrequencyResponse(b, nullptr, Response2, 1, true, TSignalWindowType::wtRectangular, 0);
}
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler
Overload 2: TVec *RemoveDC(TVec *SrcDst);
In-place version of the RemoveDC method.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | SrcDst | TVec * |
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler
Overload 3: void RemoveDC(TVec *Src, TVec *Dst);
Not-In-place version of the RemoveDC method.
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler
Overload 4: void RemoveDC(TVec *Src, TVec *Dst, int SrcIndex, int DstIndex, int Len = MtxVecEOA);
Not-in-place version of the RemoveDC method with source and destination indexes.
Remarks:
The Src data is preserved, the destination will hold the result. If Len is not specified, the maximum possible value will be used.
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler