DSP using MATLAB 示例Example3.23
代码:
% Discrete-time Signal x1(n) : Ts = 0.0002
Ts = 0.0002; n = -25:1:25; nTs = n*Ts; x1 = exp(-1000*abs(nTs)); figure('NumberTitle', 'off', 'Name', 'Example3.23 Reconstructed From x1(n)');
set(gcf,'Color','white');
subplot(2,1,1); stairs(nTs*1000,x1); grid on; %axis([0,1,0,1.5]); % Zero-Order-Hold
title('Reconstructed Signal from x1(n) using zero-order-hold');
xlabel('t in msec.'); ylabel('xa(t)'); hold on;
stem(n*Ts*1000,x1); hold off; subplot(2,1,2); plot(nTs*1000,x1); grid on; %axis([0,1,0,1.5]); % first-Order-Hold
title('Reconstructed Signal from x1(n) using first-Order-Hold');
xlabel('t in msec.'); ylabel('xa(t)'); hold on;
stem(n*Ts*1000,x1); hold off; % Discrete-time signal x2(n) : Ts=0.001
Ts = 0.001; n = -5:1:5; nTs = n*Ts; x2 = exp(-1000*abs(nTs)); % Plot
figure('NumberTitle', 'off', 'Name', 'Example3.23 Reconstructed From x2(n)');
set(gcf,'Color','white');
subplot(2,1,1); stairs(nTs*1000, x2); grid on; % axis([-1,1,-1,1]); % Zero-Order-Hold
title('Reconstructed Signal from x2(n) using zero-order-hold ');
xlabel('t in msec.'); ylabel('xa(t)'); hold on;
stem(n*Ts*1000,x2); hold off; subplot(2,1,2); plot(nTs*1000, x2); grid on; % axis([-1,1,-1,1]); % First-Order-Hold
title('Reconstructed Signal from x2(n) using first-order-hold ');
xlabel('t in msec.'); ylabel('xa(t)'); hold on;
stem(n*Ts*1000,x2); hold off;
运行结果:
DSP using MATLAB 示例Example3.23的更多相关文章
- DSP using MATLAB 示例Example3.21
代码: % Discrete-time Signal x1(n) % Ts = 0.0002; n = -25:1:25; nTs = n*Ts; Fs = 1/Ts; x = exp(-1000*a ...
- DSP using MATLAB 示例 Example3.19
代码: % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = exp(-1000*abs(t)); % Discrete-time Signa ...
- DSP using MATLAB示例Example3.18
代码: % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = exp(-1000*abs(t)); % Continuous-time Fou ...
- DSP using MATLAB示例Example3.16
代码: b = [0.0181, 0.0543, 0.0543, 0.0181]; % filter coefficient array b a = [1.0000, -1.7600, 1.1829, ...
- DSP using MATLAB 示例Example3.22
代码: % Discrete-time Signal x2(n) Ts = 0.001; n = -5:1:5; nTs = n*Ts; Fs = 1/Ts; x = exp(-1000*abs(nT ...
- DSP using MATLAB 示例Example3.17
- DSP using MATLAB 示例 Example3.15
上代码: subplot(1,1,1); b = 1; a = [1, -0.8]; n = [0:100]; x = cos(0.05*pi*n); y = filter(b,a,x); figur ...
- DSP using MATLAB 示例 Example3.13
上代码: w = [0:1:500]*pi/500; % freqency between 0 and +pi, [0,pi] axis divided into 501 points. H = ex ...
- DSP using MATLAB 示例 Example3.12
用到的性质 代码: n = -5:10; x = sin(pi*n/2); k = -100:100; w = (pi/100)*k; % freqency between -pi and +pi , ...
随机推荐
- 【leetcode】Reorder List (middle)
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do thi ...
- 【leetcode】Rotate Image(middle)
You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). ...
- 【linux】虚拟机安装centos后ping ip地址出现错误:Network is unreachable
来源:https://my.oschina.net/stonezing/blog/515480 方案一: 进入/etc/sysconfig/network-scripts/ 查看这下面的文件 每个人的 ...
- UIButton 的点击事件详解
UIControlEventTouchDown 单点触摸按下事件:用户点触屏幕,或者又有新手指落下的时候. UIControlEventTouchDownRepeat 多点触摸按下事件,点触计数大于1 ...
- powerdesigner新建模型教程
1.现在开始使用PowerDesigner创建数据库,首先运行程序,进入主界面:
- [Android Pro] Java进阶学习:jar打包详解
jar文件听说过吗,没有?或者陌生!好,没关系,这就是我们的第一站:打包发布. 为什么会有这个玩意呢,首先,这是jar的全称:JavaTM Archive (JAR) file,是的,就是java存档 ...
- CentOS7下Firewall防火墙配置用法详解
官方文档地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide ...
- sql boolean类型
关于 MySQL 的 boolean 和 tinyint(1) boolean类型MYSQL保存BOOLEAN值时用1代表TRUE,0代表FALSE,boolean在MySQL里的类型为tinyint ...
- Android Message Handling Mechanism
转自:http://solarex.github.io/blog/2015/09/22/android-message-handling-mechanism/ Android is a message ...
- Android中Service 使用详解(LocalService + RemoteService)
Service 简介: Service分为本地服务(LocalService)和远程服务(RemoteService): 1.本地服务依附在主进程上而不是独立的进程,这样在一定程度上节约了资源,另外L ...