Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to remove dc component of a vector under matlab

Status
Not open for further replies.

kiya

Newbie level 2
Newbie level 2
Joined
Mar 21, 2005
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
remove dc component

i just read some code and don't quite understand its theory.
i am new bie in DSP area. that is

Code:
% force xx as a column vector
xx = xx(:);
% remove dc component
xx = conv(xx,ones(3,1))/3;
xx = xx-mean(xx);

anybody can explain for me about the sencond sentence? what does it used for? and what's the theory it is used?
thanks a lot!!
 

dc remove matlab

The sentence

xx = conv(xx,ones(3,1))/3;

have no meaning for dc component removing. This term looks like sliding average for removing of high-frequency signal components (or noise). The dc removing itself describing by third term (where mean(xx) - dc bias):

xx = xx-mean(xx);

And nothing but this!!!
 

how to remove dc of signal matlab

yes, you are right. thank you!
but can you explain also about
Code:
xx = conv(xx,ones(3,1))/3;
what's ones(3,1) stand for? as i know, it is just a vector with [1;1;1].
and how to calculate the features of this filter?
 

remove dc matlab

You are little wrong. The sentence xx = conv(xx,ones(3,1))/3 is the convolution of input sequence and vector [1/3; 1/3; 1/3]. As I mentioned this sentence looks like sliding average for noice removing.

What kind of features do you want to calculate?

Z-transform: H(z) = 1/3+(z^-1)/3+(z^-2)/3.
Phase-Frequency responce: W(w) = 1/3+exp(-jw)/3+exp(-2jw)/3 = H(exp(jw)).

All features (pass-band, phase delay, side-lobes attenuation and so on) of this filter calculated from this responce.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top