matlabfft简单例子(A simple example of matlabfft)

matlabfft简单例子(A simple example of matlabfft)

N = 128;

N = 0: n - 1;

T = n/fs.

F0 = 10; % set the frequency of the sinusoidal signal

% generates sinusoidal signals

X = sin (2 * PI * f0 * t);

Figure (1);

Subplot (231);

The plot (t, x); The time domain waveform for sinusoidal signals

Xlabel (' t ');

Ylabel (' y ');

Title (' sine signal y = 2 * PI * 10t time domain waveform ');

The grid;

% carry FFT transform and do the spectrum

Y = FFT (x, N); I'm going to do the FFT transformation

Mag = abs (y); Amplitude % o

F = (0: length (y) - 1) '* fs/length (y); The corresponding frequency conversion is performed

Figure (1);

Subplot (232);

The plot (f, mag); % of the spectrum

The axis (,0,80 [0100]);

Xlabel (' frequency (Hz));

Ylabel (' amplitude);

Title (' sine signal y = 2 * PI * 10t spectrum diagram N = 128 ');

The grid;

MATLAB FFT program 2009-11-08 16:30 CLC

X % input signal

M = nextpow2 (x); The lowest power m of 2 for the length of x

N = 2 ^ M;

If length (x) < N

X = [x, zeros (1, N - length (x)]; If the length of x is not the power of 2, the integer power of 0 to 2

The end

An NXD = bin2dec (fliplr (dec2bin (1: N - 1, M))) + 1; 1:2 % o ^ M sequence number in the reverse order

Y = x (an NXD); % will arrange x in reverse order as the initial value of y

WN = exp (-i 2 * PI * / N);

For L = 1: M

B = 2 ^ L / 2; The two input data of each butterfly are separated by B points, each of which has B different rotation factors

For J = 0: B - 1 % J represents different rotation factors

P = J * 2 ^ (M - L);

WNp = WN ^ p;

For k = J + 1:2 ^ m: N % of this butterfly operation across the interval of 2 ^ L

KP = k + B; The relationship between the two factors corresponding to the unit subscript

T = y (KP) * WNp; The product of the % butterfly operation

Y (KP) = y (k) - t; % butterfly operation, you must first do the subtraction operation, then add operation, otherwise you will use the intermediate variable to pass y (k).

Y (k) = y (k) + t; % butterfly operation

The end

The end

The end

y

Y1 = FF

matlab fft简单小例子,matlabfft简单例子(A simple example of matlabfft).doc相关推荐

  1. c语言写的简单小程序,一些简单的小程序_6——C语言篇

    1.写一个函数实现任意行列数的乘法表 #define _CRT_SECURE_NO_WARNINGS #include void mul(int n) { int i = 0; int j = 0; ...

  2. r语言ggplot2一夜多图_R语言ggplot2画四方形的热图展示相关系数的简单小例子

    R语言里画热图通常会使用pheatmap这个包.如果想使用ggplot2这个包画热图的话需要借助geom_tile()这个函数.今天的内容就以相关系数的数据为例介绍一下ggplot2画热图的一个简单小 ...

  3. windows下dlib库简介、安装问题解决及简单小例子 (python)

    一.dlib简介 Dlib是一个现代C++框架,解决包含机器学习算法以及开发复杂软件的实现问题,它被广泛应用在工业和学术研究领域,包括机器人.嵌入式设备.移动手机以及大规模高性能计算环境中,DLib的 ...

  4. matlab将图像用傅里叶旋转,用matlab实现数字图像处理几个简单例子.doc

    用matlab实现数字图像处理几个简单例子.doc 实验报告实验一 图像的傅里叶变换(旋转性质)实验二 图像的代数运算实验三 filter2 实现均值滤波实验四 图像的缩放朱锦璐04085122实验一 ...

  5. Python 100个简单小例子(持续更新中)

    Python 100个简单小例子(持续更新中) 1 编写一个计算平年还是闰年的小例子其核心是年份可以整除4和400,且不是100的倍数且2000年是特殊年份为闰年! year = int(input( ...

  6. python语法简单吗_python基本语法练习实例 python好学吗? 语法简单吗? 举个例子?...

    Python学了基础语法,如何练习一些项目呢?学了基础语法,你学一学Django框架和爬虫吧,我现在正在学爬虫相关的教程,黑马程序员视频库里就有相关的教程,我就是在那里下载的,目前正在学. 推荐几个适 ...

  7. 20. [Python GUI] PyQt5中的模型与视图框架-实现一个简单的文件浏览器的例子

    PyQt5中的模型与视图框架-实现一个简单的文件浏览器的例子 一.使用模型/视图实现一个简单的文件浏览器 二.小手一抖,点个赞再走哦~ 一.使用模型/视图实现一个简单的文件浏览器 这个例子里不涉及数据 ...

  8. 一个简单的HTTP通讯的例子,使用了CInternetSession,CHttpConnection,CHttpFile三个类

    一个简单的HTTP通讯的例子,使用了CInternetSession,CHttpConnection,CHttpFile三个类. http://blog.csdn.net/STK_tianwen/ar ...

  9. 一个简单的 Hello world! 例子使用 boost::mpi::group 和 boost::mpi::broadcast()

    一个简单的 Hello world! 例子使用 boost::mpi::group 和 boost::mpi::broadcast 实现功能 C++实现代码 实现功能 一个简单的 Hello worl ...

最新文章

  1. 关于从Image字段读取图片流并显示在PictureBox控件时报‘参数无效’异常的解决方法...
  2. Gogs 0.11.19 发布,自助 Git 托管服务
  3. 大数据风控-反欺诈之黑卡与养卡
  4. 释疑の函数POPUP_TO_CONFIRM
  5. linux命令行设置编码,编码样式-Linux命令行开关和参数是否有标准?
  6. c# mysql代码中写事务_代码中添加事务控制 VS(数据库存储过程+事务) 保证数据的完整性与一致性...
  7. Mybatis There is no getter for property named 'XXX' in 'class java.lang.XXX
  8. maven 学习笔记--仓库,聚合和继承,私服搭建
  9. 上一页下一页html样式,软件 | hexo博客主题yilia上一页下一页显示的问题
  10. 官宣!CSDN 发布 C 站软件工程师能力认证
  11. Mongodb db.serverStatus()所关心的几个输出值
  12. 电工最实用口诀 背会就是老电工
  13. 2011年上半年国内优秀初创企业产品汇总
  14. 用C语言实现C++ 继承与多态
  15. python证件照换底色_还在用PS给证件照换底色吗?20行代码教你用Python给证件照换底色...
  16. Windows系列操作系统注册表的组成与分析(转)
  17. Ubuntu16.04(14.04) 安装网卡驱动教程
  18. 智能音箱 功放与喇叭选型 参考
  19. linux上安装java失败,Linux下安装jdk失败怎么办
  20. Coinbase 上市,说唱歌手 Nas 或将净赚 1 亿美元

热门文章

  1. js样式会覆盖html样式,js实现html节点、CSS样式、事件的动态添加以及html覆盖层的添加...
  2. java class is frozen_利用javassit简单操作class文件 1
  3. 20210907 Engine and SDK in development
  4. Struts2 常量配置
  5. Android version and Linux Kernel version
  6. 080929 气温骤降
  7. Ubuntu GNOME单击任务栏图标最小化设置
  8. 最大化平均值 (二分搜索法)
  9. 【Python】Python基础
  10. 51nod1307(暴力树剖/二分dfs/并查集)