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

📄 fig811.m

📁 自适应滤波器的最陡下降法示意图
💻 M
字号:
% Figure 8.11
clear
clf
colordef(1,'white')

hopt = [1 2]';
evr = [2 1];
evr = evr.^2;
power = evr * ones(size(evr))';
evr = evr/power;
D = diag(evr);
theta = 30;
theta = theta/180*pi;
V = zeros(2,2);
V(:,1) = [cos(theta)  -sin(theta)]';
V(:,2) = [sin(theta)  cos(theta)]';
phiyy = V*D*V';

phiyx = phiyy * hopt;

NN = 50;
AA = zeros(NN,NN);
hmin = 0;
hmax = 6;
dh = (hmax-hmin)/(NN-1);
hx = hmin:dh:hmax;
hy = hx;
h = zeros(size(hopt));

% mse surface
for ii=1:NN
    for jj=1:NN
        h = [hx(ii) hy(jj)]';
        AA(ii,jj) = 1 - 2*h'*phiyx + h'*phiyy*h;
    end
end

set(gca,'FontSize',18)
%  subplot(121);
contour(hx,hy,AA,20);
axis('square');
set(gca,'FontSize',18);
xlabel('tap 0');
ylabel('tap 1');
% title('(b)')
hold on

% optimum
plot(hopt(2),hopt(1),'*')

% steepest descent
MM = 10;
h = [5,4]';
convg = zeros(2,MM);
convg(:,1) = h;
mu = 1/3;
for ii = 2:MM
    grd = 2*(phiyy*h - phiyx);
    h = h - mu * grd;
    convg(:,ii) = h;
end

plot(convg(2,:),convg(1,:),'y');
hold off

⌨️ 快捷键说明

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