⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 error_plot.m

📁 用dsp解压mp3程序的算法
💻 M
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% error_plot.m - Program for plotting error signal in exmp9_5.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

x  = 0.1*randn(1,640); % normally distributed random numbers
b  = fir1(31,0.3);     % an FIR system as a unknown system
d  = filter(b,1,x);    % generated desired signal d(n)
w0 = zeros(1,32);      % intialize coefficient vector w(0) to 0
mu = 0.75;             % step size mu for the LMS algorithjm
s  = initlms(w0,mu);   % initialize w(0) and step size mu
[y,e,s] = adaptlms(x,d,s); % adaptive filtering
figure;
n = [1:640]; plot(n,e);% plot error signal e(n)
axis([1 640 -inf inf]);
xlabel('Time index n'); ylabel('Amplitude');
title('Convergence of error signal e(n)');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -