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

📄 fg_03_14.m

📁 英文书《Digital Signal Processing with Examples in MATLAB》附带的MATLAB实例
💻 M
字号:
% fg_03_14  Interpolation via zero insertion in freq. domain.
Lx=18; K=2; T=.003; Ly=500;
n=0:Lx-1;
x=sin(2*pi*n.^2/100);
% Plot x.
sp_fig(1);
axis([0 .05 -1.4 1.4]);
set(gca,'fontname','times','fontsize',16)
set(gca,'position',[.13 .15 .8 .6]);
line(n*T,x,'linestyle','none','marker','o','color','k'); grid;
% Reconstruct.
y=resamp(x,Ly);
% Plot the reconstruction.
T2=T*Lx/Ly; t=0:T2:(Ly-1)*T2;
line(t,y,'linestyle','-','color','k');
xlabel('t (s)');
ylabel('Samples and reconsruction of {x}({t})');
z=['{T}=3 ms; {Lx}=',int2str(Lx),'; {Ly}=',int2str(Ly)];
h=text(.016,1.3,z);
set(h,'fontname','times','fontsize',16);

⌨️ 快捷键说明

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