p5_1.m
来自「基于matlab的DSP(数字信号处理)学习资料」· M 代码 · 共 22 行
M
22 行
% Program P5_1% Illustration of the Sampling Process % in the Time-Domainclf;t = 0:0.0005:1;f = 13;xa = cos(2*pi*f*t);subplot(2,1,1)plot(t,xa);gridxlabel('Time, msec');ylabel('Amplitude');title('Continuous-time signal x_{a}(t)');axis([0 1 -1.2 1.2])subplot(2,1,2);T = 0.1;n = 0:T:1;xs = cos(2*pi*f*n);k = 0:length(n)-1;stem(k,xs);grid;xlabel('Time index n');ylabel('Amplitude');title('Discrete-time signal x[n]');axis([0 (length(n)-1) -1.2 1.2])
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?