Matlab中的FFT计算
来源:互联网 发布:新网域名证书查询 编辑:程序博客网 时间:2024/06/08 06:35
1. FFT中幅度的计算:
complex amplitude = 实际幅度*N/2
解释如下:
https://www.dsprelated.com/showarticle/607.php
The DFT Magnitude of a Real-valued Cosine Sequence
A*n/2
, where A
is the original amplitude and n
is the number of FFT points. This is true only if the number of FFT points is greater than or equal to the number of data samples. If the number of FFT points is less, the FFT amplitude is lower than the original amplitude by the above amount.----------------------------------
Fs = 1000; % Sampling frequency
T = 1/Fs; % Sampling period
L = 1500; % Length of signal
t = (0:L-1)*T; % Time vector
S = 0.7*sin(2*pi*50*t) + sin(2*pi*120*t);
----------------
f = Fs*(0:(L/2))/L;
计算频率的一半,L点对应到最大频率Fs。写法最好这么写,构成751点长度的序列
-----------------------------------
Y = fft(S);
直接FFT,得到的是复数值的complex amplitude。 里面有幅度和频率信息
-----------------------------------
P2 = abs(Y/L);
% If X is complex, abs(X) returns the complex magnitude.
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
这一段就是上面说的:Y里面直接计算出来的幅度是spectral amplitude, 它跟原信号中的实际幅度对应关系是
Spectral Amplitude = True Amplitude *L/2
--------------------------------------
plot(f,P1)
title('Single-Sided Amplitude Spectrum of S(t)')
xlabel('f (Hz)')
ylabel('|P1(f)|')
- Matlab中的FFT计算
- 探秘MATLAB求FFT,计算能量谱
- 探秘MATLAB求FFT,计算能量谱
- 浅谈Matlab中的快速傅里叶变换(fft)
- MATLAB中通过fft计算信号频谱的问题
- Matlab中的符号计算
- MATLAB中的fft后为何要用fftshift?
- MATLAB中的fft后为何要用fftshift?
- MATLAB中的fft后为何要用fftshift?
- matlab在DSP中的应用(七)---快速傅里叶变换(FFT)
- Matlab中的有限域计算
- matlab中的IoU计算函数
- FFT的matlab程序
- FFT的matlab程序
- Matlab实现FFT变换
- Matlab实现FFT变换
- MATLAB中FFT使用方法
- Matlab FFT 测试
- WebView的简单使用,附加一点JS交互操作
- TI—CC3200【3】TLV320AIC3254调节MIC录音增益
- 华为笔试题
- "TypeError: Cannot read property 'undefined' of undefined"
- svn命令
- Matlab中的FFT计算
- 动态规划入门级教学(leetcode)53.Maximum Subarray
- 反射
- VLC播放器应用------LIBVLC API解析
- 深度优先搜索与广度优先搜索
- poj 1000:A+B Problem
- eclipse 启动闪退
- 安装版tomcat如何设置开机自启
- 【补充】常用Makefile格式分析