《DSP using MATLAB》示例Example7.20


代码:
M = 51; alpha = (M-1)/2; Dw = 2*pi/M; l = 0:M-1; wl = Dw*l;
T1 = j*0.39;
k1 = 0:floor((M-1)/2); k2 = floor((M-1)/2)+1:M-1; Hrs = [0, -j*ones(1, (M-3)/2), -T1, T1, j*ones(1, (M-3)/2)];
angH = [-alpha*Dw*k1, alpha*Dw*(M-k2)];
H = Hrs.*exp(j*angH); h = real(ifft(H, M)); [db, mag, pha, grd, w] = freqz_m(h, 1);
[Hr, ww, c, L] = Hr_Type3(h); %Plot figure('NumberTitle', 'off', 'Name', 'Exameple 7.20')
set(gcf,'Color','white'); subplot(2,2,1); plot(wl(1:26)/pi, j*(Hrs(1:26)), 'o', ww/pi, -Hr); axis([0, 1, -1.0, 1.5]); grid on;
xlabel('frequency in \pi nuits'); ylabel('Amplitude Response'); title('Hilbert Transformer, frequency sampleing design: M=51'); subplot(2,2,2); stem(l, h); axis([-1, M, -1.1, 1.1]); grid on;
xlabel('n'); ylabel('h(n)'); title('Impulse Response'); subplot(2,2,3); plot(w/pi, pha/pi); axis([0, 1, -1.5, 2]); grid on;
xlabel('frequency in \pi units'); ylabel('pha(w) in \pi units'); title('Phase Response'); subplot(2,2,4); plot(w/pi, db); axis([0, 1, -60, 10]); grid on;
xlabel('frequency in \pi units'); ylabel('Decibels'); title('Magnitude Response');
运行结果:

过渡带中有采样点(左上图)的效果。
《DSP using MATLAB》示例Example7.20的更多相关文章
- 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 示例Example2.11
上代码: b = [1]; a = [1, -1, 0.9]; n = [-20:120]; h = impz(b,a,n); set(gcf,'Color','white'); %subplot(2 ...
- 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 ...
- 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.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.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 ...
随机推荐
- 验证码插件代码:image.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"% ...
- ASP.NET的内置对象
Request 该对象用于检索从浏览器向服务器所发送的请求中的信息.在按下“提交”按钮时,Request对象将读取和提取通过HTTP请求发送的参数.在用户提交表单时,包含在输入控件中的数据将与表单 ...
- [SHOI2013]发微博
Description 刚开通的SH微博共有n个用户(1..n标号),在短短一个月的时间内,用户们活动频繁,共有m条按时间顺序的记录: ! x 表示用户x发了一条微博: + x y 表示用户x ...
- [国家集训队2011]happiness
Description 高一一班的座位表是个n*m的矩阵,经过一个学期的相处,每个同学和前后左右相邻的同学互相成为了好朋友.这学期要分文理科了,每个同学对于选择文科与理科有着自己的喜悦值,而一对好朋友 ...
- LeetCode——Detect Capital
LeetCode--Detect Capital Question Given a word, you need to judge whether the usage of capitals in i ...
- Pyspider爬虫教程
Pyspider爬虫教程 一.安装 1. 安装pip (1)准备工作 yum install –y make gcc-c++ python-devel libxml2-devel libxslt-de ...
- lua笔记之userdata
1.一直使用框架里封装好的c库,想着自己一点一点的写些例子,学习下,以后需要c库,可以自己写了. 下边是一个简单的userdata的例子--数组操作. newarray.c #include &quo ...
- hive 导出数据到本地
有时候需要将hive库中的部分数据导入至本地,这样子做可视化和小规模的数据挖掘实验都是比较方便的.数据导入至本地的HQL语法如下: INSERT OVERWRITE [LOCAL] DIRECTORY ...
- jsonp跨域传过来的数据格式
var uri1 = 'https://api.github.com?callback=JSON_CALLBACK'; /**/JSON_CALLBACK({ "meta": { ...
- spring boot 跨域问题
public class WebMvcConfig implements WebMvcConfigurer { @Override public void addInterceptors(Inter ...