Help me remove the DC of a signal in Matlab

Status
Not open for further replies.

sirdivi

Newbie level 5
Joined
Jun 17, 2010
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,348
Hello, i want to remove the dc of my signal in matlab but i do not know if i have to implement a filter center in zero or sustraining the main value of the signal.
thanks
 

Re: Removing DC

Hi Sridevi,

You can do it in two ways.

Way1: Just pass the signal through a highpass filter. (This will remve the DC),
Use fadtool to design very constrained filter.

Way2: (Normally high pass filter is not advisable)

Step1: You need to implement a low pass filter to extract the DC Component of your input signal. (You can use fdatool and design a very constrained filter, just allowing DC)

Step2: Then subtract the output of low pass signal from your signal.
 

Re: Removing DC

just subctract the mean value to your signal. If the samples are contained in the vector "x", the zero DC signal will be:

y = x - mean(x);
 

Re: Removing DC

albbg said:
just subctract the mean value to your signal. If the samples are contained in the vector "x", the zero DC signal will be:

y = x - mean(x);

This is much simpler.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…