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.

What type of filter is used in this code?

Status
Not open for further replies.

caleigh

Newbie level 3
Joined
Jun 10, 2008
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,311
R = 50;
d = rand(R,1)-0.5;
m = 0:1:R-1;
s = 2*m.*(0.9.^m);
x = s + d';

figure(1)
plot(m,d,'r-',m,s,'b--',m,x,'g:')
xlabel('Time index n'); ylabel('Amplitude')
legend('d[n]','s[n]','x[n]');
pause

M = input('Number of input samples = ');
b = ones(M,1)/M;
y = filter(b,1,x);

figure(2)
plot(m,s,'r-',m,y,'b--')
legend('s[n]','y[n]');
xlabel ('Time index n');ylabel('Amplitude')

this coding,ca anybody tell me what type of filter is being use in this coding
 

Re: filter coding

It is called a "comb" I think. It just produces average of last M samples. Can be used for interpolation.
-b
 

Re: filter coding

bulx said:
It is called a "comb" I think. It just produces average of last M samples. Can be used for interpolation.
-b

thanx bulx...that is very helpful...bulx..can you help me on the coding, what is the purpose of each coding?i really new o the matlab and the filter coding...please
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top