《DSP using MATLAB》Problem 5.12

1、从别的地方找的证明过程:


2、代码
function x2 = circfold(x1, N)
%% Circular folding using DFT
%% ---------------------------------------------
%% x2 = circfold(x1, N)
%% x2 = circulary folded output sequence
%% x1 = input sequence of length <= N
%% N = circular buffer length
%% X1k_DFT = dft(x1, N);
Xk = dft(X1k_DFT, N);
x2 = Xk/N;
%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%% Output Info about this m-file
fprintf('\n***********************************************************\n');
fprintf(' <DSP using MATLAB> Problem 5.12 \n\n'); banner();
%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ % --------------------------------------------------------------
% 1 x(n) = [1, 3, 5, 7, 9, -7, -5, -3, -1]
% -------------------------------------------------------------- xx1 = [1, 3, 5, 7, 9, -7, -5, -3, -1];
NN1 = length(xx1); % length is 6
nn1 = [0 : NN1-1]; % ----------------------------------------------------
% 1st way to get Circulary folded
% ----------------------------------------------------
xx1_cf = xx1( mod(-nn1, NN1)+1 ); figure('NumberTitle', 'off', 'Name', 'P5.12 x(n)')
set(gcf,'Color','white');
subplot(2,1,1); stem(nn1, xx1);
xlabel('n'); ylabel('x(n)');
title('x(n) ori sequence'); grid on;
subplot(2,1,2); stem(nn1, xx1_cf);
xlabel('n'); ylabel('x(n)');
title('x((-n))_N Circulary folded by mod way'); grid on; % ------------------------------------------------------
% 2nd way to get Circulary folded
% DFT
% ------------------------------------------------------ xx2 = circfold(xx1, NN1); figure('NumberTitle', 'off', 'Name', 'P5.12 x(n)')
set(gcf,'Color','white');
subplot(2,1,1); stem(nn1, xx1);
xlabel('n'); ylabel('x(n)');
title('x(n) ori sequence'); grid on;
subplot(2,1,2); stem(nn1, xx2);
xlabel('n'); ylabel('x(n)');
title('x((-n))_N Circulary folded by DFT way'); grid on;
运行结果:



《DSP using MATLAB》Problem 5.12的更多相关文章
- 《DSP using MATLAB》Problem 7.12
阻带衰减50dB,我们选Hamming窗 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...
- 《DSP using MATLAB》Problem 6.12
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 8.12
代码: %% ------------------------------------------------------------------------ %% Output Info about ...
- 《DSP using MATLAB》Problem 4.12
代码: function [As, Ac, r, v0] = invCCPP(b0, b1, a1, a2) % Determine the signal parameters Ac, As, r, ...
- 《DSP using MATLAB》Problem 3.12
- 《DSP using MATLAB》Problem 7.6
代码: 子函数ampl_res function [Hr,w,P,L] = ampl_res(h); % % function [Hr,w,P,L] = Ampl_res(h) % Computes ...
- 《DSP using MATLAB》Problem 6.22
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 6.8
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 5.21
证明: 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...
随机推荐
- MyBatis 为什么需要通用 Mapper ?
一.通用 Mapper 的用途 ? 我个人最早用 MyBatis 时,先是完全手写,然后用上了 MyBatis 代码生成器(简称为 MBG),在使用 MBG 过程中,发现一个很麻烦的问题,如果数据库字 ...
- leetcode 刷题 数组类 Two Sum
---恢复内容开始--- Two Sum Given an array of integers ,find two numbers such that they add up to a specifi ...
- 3.BIND从服务器及缓存服务器配置
一.域从服务器 一个域的从服务器(slave)通常是为了备份及负载均衡使用,所有这个域的信息都是由域的主服务器控制,域slave服务器启动时会从域的主服务器(master)上抓取指定域的zone配置文 ...
- java 实现简单的顺序栈
package com.my; import java.util.Arrays; /** * 顺序栈 * @author wanjn * */ public class ArrayStack { pr ...
- 首次编译Java小程序
public class helloworld { public static void main(string[] args) { system.out.println("hello wo ...
- Problem A 还会用继承吗?
定义一个Base类,包括1个int类型的属性,以及满足输出格式要求的构造函数.拷贝构造函数和析构函数. 定义Base类的子类Derived,包括1个int类型的属性, 以及满足输出格式要求的构造函数. ...
- PropertiesUtil 读取properties
package com.midea.clean.util; import java.io.InputStream; import java.io.UnsupportedEncodingExceptio ...
- swiper 支持性
Swiper3 是一款免费以及轻量级的移动设备触控滑块的js框架,使用硬件加速过渡(如果该设备支持的话).主要使用于移动端的网站.移动web apps,native apps和hybrid apps. ...
- day 71-72 cookie 和session
拓展知识 request---->请求信息 属性: request.path # 获取访问文件路径 request.method属性 #获取请求中使用的HTTP方式(POST/G ...
- c#帮助文档chm打不开的问题
c# 帮助文档,chm 格式, 不可以放在含有字符 # 的文件夹下(包括当前文件夹和上级文件夹),文件名也不可以含有 # 字符, 否则会打不开.