📄 frequ.m
字号:
% this plots the frequency responses
% keep all variables local in scope
function [] = frequ(spacing,H,F,DD,Fa,Fb);
w=(0:255)/256;
if (spacing==1)
subplot(2,4,1); semilogy(w,abs(F));
title('BSE (Mag)');
subplot(2,4,5); plot(w,unwrap(angle(F)));
title('BSE (Phase)');
ax=[0 1 min(min(abs(DD)),1e-3) max(max(abs(DD)),1.5)];
subplot(2,4,2); semilogy(w,abs(DD));
axis(ax);
title('DFE (Mag)');
subplot(2,4,6); plot(w,unwrap(angle(DD)));
title('DFE (Phase)');
ax=[0 1 min(min(abs(H)),1e-3) max(max(abs(H)),1.5)];
subplot(2,4,3); semilogy(w,abs(H));
axis(ax);
title('Channel-BSE (Mag)');
subplot(2,4,7); plot(w,unwrap(angle(H)));
title('Chan-BSE (Phase)');
ax=[0 1 min(min(abs(H)),1e-3) max(max(abs(H)),1.5)];
subplot(2,4,4); semilogy(w,abs(H-DD));
axis(ax);
title('Chan-BSE+DFE (Mag)');
subplot(2,4,8); plot(w,unwrap(angle(H-DD)));
title('Chan-BSE+DFE (Phase)');
elseif (spacing==1/2)
subplot(2,4,1); semilogy(w,abs(Fa),w,abs(Fb),'r--');
legend('(a)','(b)');
title('Subeq. (Mag)');
subplot(2,4,5); plot(w,unwrap(angle(Fa)),w,unwrap(angle(Fb)),'r--');
legend('(a)','(b)');
title('Subeq. (Phase)');
ax=[0 1 min(min(abs(DD)),1e-3) max(max(abs(DD)),1.5)];
subplot(2,4,2); semilogy(w,abs(DD));
axis(ax);
title('DFE (Mag)');
subplot(2,4,6); plot(w,unwrap(angle(DD)));
title('DFE (Phase)');
ax=[0 1 min(min(abs(H)),1e-3) max(max(abs(H)),1.5)];
subplot(2,4,3); semilogy(w,abs(H));
axis(ax);
title('Channel-FSE (Mag)');
subplot(2,4,7); plot(w,unwrap(angle(H)));
title('Chan-FSE (Phase)');
ax=[0 1 min(min(abs(H)),1e-3) max(max(abs(H)),1.5)];
subplot(2,4,4); semilogy(w,abs(H-DD));
axis(ax);
title('Chan-FSE+DFE (Mag)');
subplot(2,4,8); plot(w,unwrap(angle(H-DD)));
title('Chan-FSE+DFE (Phase)');
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -