《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
证明: 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...
随机推荐
- 程序从sqlserver2008搬家到MySQL5.6
1.数据表结构的搬家 SqlServer的建表sql语句在MySQL中肯定不能运行 这里使用转换工具 下载地址: https://download.csdn.net/download/zhutouai ...
- sqlserver查询父子级关系
自上向下的查询方法,查询出自身以及所有的子孙数据: --自上往下搜索 ;with maco as ( union all select t.* from ty_Dictionary t,maco m ...
- 在学习DRF之前
学习DRF之前~~~ 在学习DRF之前~我们要先复习一些知识点~~ FBV和CBV 学习Django的时候~我们已经学习过了CBV以及FBV~~我们来复习一下~~ 什么是FBV和CBV呢~~ FB ...
- main.jsbundle 脱离掉本地服务
我们在本地调试的时候,可以使用index.js来开启本地服务,在局域网内运行app. 但是你会发现一旦你脱离了这个局域网就会造成app无法显示 这时候我们使用main.jsbundle 1.在Reac ...
- eclipse配置和使用memory Analyse分析内存
1. 安装 在Eclipse help -> Eclipse Marketplace下搜索Memory: 图 1-1 搜索MAT插件 按照步骤安装完成重启即可. 2. 测试代码准备 测试代码 ...
- DevExpress v18.1新版亮点——Reporting篇(二)
用户界面套包DevExpress v18.1日前终于正式发布,本站将以连载的形式为大家介绍各版本新增内容.本文将介绍了DevExpress Reporting v18.1 的新功能,快来下载试用新版本 ...
- JDK的下载及配置
下载地址,为了兼容最好安装1.8版本 jdk1.8:http://jbox.jd.com/quickshare/d2wheyazjtdccshou2dbo24roejdk1.7:http://jbox ...
- mysql创建存储过程,定时任务,定时删除log
-- 创建存储过程 清除30天前的日志create procedure deleteLog()BEGINdelete from contract_vlog where create_time<D ...
- powerdesigner导出sql时报错 Generation aborted due to errors detected during the verification of the model.
powerdesigner导出sql时报错 Generation aborted due to errors detected during the verification of the model ...
- 一个灵活的AssetBundle打包工具
尼尔:机械纪元 上周介绍了Unity项目中的资源配置,今天和大家分享一个AssetBundle打包工具.相信从事Unity开发或多或少都了解过AssetBundle,但简单的接口以及众多的细碎问题 ...