资源简介
matlab开发-FastFFTFunction。用于计算频率振幅的函数,也可以绘制波德图。
代码片段和文件信息
function [vFrequency vAmplitude] = fastfft(vData SampleRate Plot)
%FASTFFT Create useful data from an FFT operation.
% Usage: [vFrequency vAmplitude] = fastfft(vData SampleRate [Plot])
%
% (no plot will be shown if the last input == 0 or is not included)
%
% This function inputs ‘vData‘ as a vector (row or column)
% ‘SampleRate‘ as a number (samples/sec) ‘Plot‘ as anything
% and does the following:
%
% 1: Removes the DC offset of the data
% 2: Puts the data through a hanning window
% 3: Calculates the Fast Fourier Transform (FFT)
% 4: Calculates the amplitude from the FFT
% 5: Calculates the frequency scale
% 6: Optionally creates a Bode plot
%
% Created 7/22/03 Rick Auch mekaneck@campbellsville.com
%Make vData a row
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2158 2018-07-11 20:23 fastfft.m
- 上一篇:matlab开发-导向控制机器人
- 下一篇:matlab开发-drawline
评论
共有 条评论