DSP using MATLAB 示例Example3.4
代码:
n = [-1:3]; x = [1:5]; % x(n) = {1,2,3,4,5}
% *
%
k = 0:500;
w = (pi/500)*k; % [0,pi] axis divided into 501 points.
X = x * (exp(-j*pi/500)) .^ (n'*k); magX = abs(X); angX = angle(X); realX = real(X); imagX = imag(X); set(gcf,'Color','white');
subplot(2,2,1); plot(k/500,magX); grid on;
title('Magnitude Part');
xlabel('frequency in \pi units'); ylabel('Magnitude');
subplot(2,2,3); plot(k/500, angX/pi); grid on;
title('Angle Part');
xlabel('frequency in \pi units'); ylabel('Radians/\pi');
subplot('2,2,2'); plot(k/500, realX); grid on;
title('Real Part');
xlabel('frequency in \pi units'); ylabel('Real');
subplot('2,2,4'); plot(k/500, imagX); grid on;
title('Imaginary Part');
xlabel('frequency in \pi units'); ylabel('Imaginary');
运行结果:
DSP using MATLAB 示例Example3.4的更多相关文章
- 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.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.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 , ...
随机推荐
- sqlserver 数据库中时间函数的建立
create function [dbo].[HtoSec](@lvalue as int)RETURNS intBEGINDECLARE @temp intSet @temp = @lvalue * ...
- 22中编程语言的HelloWorld
C:printf("HelloWorld"); C++ : cout<<"HelloWorld"; QBasic : Print "Hel ...
- Mysql之日志恢复
对于Mysql,每一步操作都会有相应记录,如insert,update,delete ,drop ,alter等相关DDL或DML操作.有时难免会出错,但在出错时如何恢复以复原数据. 例如,现在有这些 ...
- AFNetworking请求设置请求头
NSString *url = @"INPUT URL HERE"; AFHTTPRequestOperationManager *manager = [AFHTTPRequest ...
- sys.sysprocesses视图的使用小结
Sys.SysProcesses 系统表是一个很重要的系统视图,主要用来定位与解决Sql Server的阻塞和死锁包含正在 SQL Server 实例上运行的进程的相关信息.这些进程可以是客户端进程或 ...
- Android Support兼容包详解
原文:http://www.open-open.com/lib/view/open1427852683115.html
- 服务器知识----IIS架设问题
1,基本配置,应用程序池,路径等. 2,权限设置 Iuser IIS_users 只读权限 3,isapi映射 framework安装目录下 运行 aspnet_regiis.exe -i 注 ...
- SQLServer事务
指访问并可能更新数据库中各种数据项的一个程序执行单元(unit)由多个sql语句组成,必须作为一个整体执行这些sql语句作为一个整体一起向系统提交,要么都执行.要么都不执行 语法步骤:开始事务:BEG ...
- 微信公众平台中的openid是什么?
在微信公众平台开发中,会遇到一个叫openid的东东,让我们这些不懂开发的摸不着头脑,开始我也是一头雾水,经过多方面查资料,终于明白是怎么回事了! openid是公众号的普通用户的一个唯一的标识,只针 ...
- jQuery ajax同步的替换方法,使用 $.Deferred()对象
function aa() { var defer = $.Deferred(); $.ajax({ url: "/Handler1.ashx", type: "post ...