《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
证明: 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...
随机推荐
- 认识微软Visual Studio Tools for AI
认识微软Visual Studio Tools for AI 微软已经发布了其 Visual Studio Tools for AI 的测试版本,这是微软 Visual Studio 2017 I ...
- C/S与B/S架构对比
概述 在这个信息急剧膨胀的社会,我们不得不说人类正进入一个崭新的时代,那就是信息时代.信息时代的一个主要而显著的特征就是计算机网络的应用.计算机网络从最初的集中式计算,经过了Client/Server ...
- VirtualBox安装CentOS7的网络配置
VirtualBox安装CentOS7的网络配置 这几天在本机VirtualBox安装CentOS时遇到了网络的坑... VirtualBox的下载地址:https://www.virtualbox. ...
- libiconv库的安装和使用
1.libiconv包的下载路径 包的下载页面http://www.gnu.org/software/libiconv/ 2.编译安装libiconv库 $tar zxvf libiconv-1.14 ...
- 《Python》 计算机基础
一.计算机基础: cpu:中央处理器,相当于人的大脑,运算中心,控制中心. 内存:暂时存储数据,与CPU交互. 优点:内存读取速度快. 缺点:容量小,造价高,断电即消失. 硬盘:长期存储数据. 优点: ...
- oracle数据导入导出数据与编码格式不正确
1.导入dmp文件 imp ZHCG/ZHCG@ORCL file=E:\20160902.1007.dmp full=y 2.导出数据 exp system/manager@ORCL file ...
- 依赖倒置(DIP)、控制反转(IOC)和依赖注入(DI)
原文: https://blog.csdn.net/briblue/article/details/75093382 写这篇文章的原因是这两天在编写关于 Dagger2 主题的博文时,花了大量的精力来 ...
- 从今天开始 每天记录HTML,CSS 部分的学习笔记
从今天开始 每天记录HTML,CSS 部分的学习笔记
- synchronized(七)
package com.bjsxt.base.sync006; /** * 死锁问题,在设计程序时就应该避免双方相互持有对方的锁的情况 * @author alienware * */public c ...
- 二、先在SD卡上启动U-boot,再烧写新的U-boot进Nandflash
1. 制作SD卡 先准备一张2G的SD卡(不能用8G的,2G的卡和8G的卡协议不一样),和烧写SD卡的工具write_sd以及需要烧写到SD卡中的u-boot-movi.bin.将SD卡格式化后连接到 ...