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

📄 program_13_2.m

📁 数字信号处理—基于计算机的方法教材上的所有例题源程序
💻 M
字号:
% Program 13_2
% Illustration of Down-Sampling by an Integer Factor
%
clf;
N = input('Output length = ');
M = input('Down-sampling Factor = ');
fo = input('Input signal frequency = ');
% Generate the input sinusoidal sequence
n = 0 : N-1;
m = 0 : N*M-1;
x = sin(2*pi*fo*m);
% Generate the down-sampled sequence
y = x([1 : M : length(x)]);
% Plot the input and the output sequences
subplot(2,1,1)
stem(n, x(1:N));
title('Input Sequence');
xlabel('Time index n');ylabel('Amplitude');
subplot(2,1,2)
stem(n, y);
title(['Output sequence down-sampled by ',num2str(M)]);
ylabel('Amplitude');xlabel('Time index n');

⌨️ 快捷键说明

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