?? idxdemo.m
字號:
% idxdemo.m
% This program is distributed as a supplement to the book
% "Biomedical Signal Processing and Signal Modeling" by E. N. Bruce,
% published by Wiley, 2000. It is provided for educational use only.
% While every effort has been made to insure its suitability to illustrate
% principles described in the above book, no specific feature or capability
% is implied or guaranteed.
x=zeros(250,1);
for k=1:5
x=x+cos(0.15*pi*k*[1:250]')/5;
end
brem=remez(49,[0 .20 .25 .35 .4 1],[0 0 1 1 0 0]);
figure(1),freqz(brem,1);subplot(211),title('Freq. response of bandpass filter')
hn=[0.5;0.5];
y=filter(hn,1,x);
x2r=filter(brem,1,x);
y2r=filter(brem,1,y);
figure(2)
subplot(411),stem(x(201:250),'.'),title('x[n]')
subplot(412),stem(y(201:250),'.'),title('y[n]')
subplot(413),stem(x2r(201:250),'.'),title('x2[n]')
subplot(414),stem(y2r(201:250),'.'),title('y2[n]')
disp('Estimated gain:')
r=151:250;(max(y2r(r))-min(y2r(r)))/(max(x2r(r))-min(x2r(r)))
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -