p10_6.m
来自「《数字信号处理实验指导书(MATLAB 版)》 著者: (美)米特拉著 」· M 代码 · 共 21 行
M
21 行
% Program P10_6
% Illustration of Interpolation Process
%
clf;
L = input('Up-sampling factor = ');
% Generate the input sequence
n = 0:49;
x = sin(2*pi*0.043*n) + sin(2*pi*0.031*n);
% Generate the interpolated output sequence
y = interp(x,L);
% Plot the input and the output sequences
subplot(2,1,1);
stem(n,x(1:50));
title('Input Sequence');
xlabel('Time index n'); ylabel('Amplitude');
subplot(2,1,2);
m = 0:(50*L)-1;
stem(m,y(1:50*L));
title('Output Sequence');
xlabel('Time index n'); ylabel('Amplitude');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?