- 1
- 0
- 约2.63千字
- 约 4页
- 2017-06-14 发布于广东
- 举报
fft变换matlab函数
The Matlab demonstration program Discrete Fourier Transform is also helpful. It may be accessed by typing demo at the Matlab prompt.
The dft function computes magnitudes and phases for a signal’s spectrum or a system’s frequency response using the DFT formula directly. It is used as follows:
[mag,phase,k] = dft(x)
where x is a signal, or
[mag,phase,k] = dft(h)
where h is an impulse response. The dft function is functionally identical to the dfs function from the HYPERLINK H:\\测试信号分析与处理\\Site Files\\Chapters\\CH8SUMM\\Matlab8\\matlab8.HTM Matlab section for chapter 8. The results of dft can be plotted using the function plotdft, which is functionally identical to plotdfs. For example,
x = [1 –2 3 0 4 –1 5 0];
[mag,phase,k] = dft(x);
plotdft(mag,phase,k,1)
Magnitude Spectrum
Phase Spectrum
?
The function fft computes the same outputs as the function dft, but does so more efficiently. The fft is calculated and plotted as follows:
xx = fft(x);
mag = abs(xx);
phase = angle(xx);
k = 0:(length(xx)-1);
plotfft(mag,phase,k,1);
Note that, like plotdft, the function plotfft is functionally identical to plotdfs. The FFT spectrum is shown below for the signal produced by the command
x = rand(1,32) – 0.5;
Signal
Magnitude Spectrum
Phase Spectrum
?
When the FFT for a signal is known, the signal can be found from the complex FFT values using the ifft function. From the example above,
check_x = ifft(xx);
and check_x equals x.
?
The function winfft permits windowing options for the FFT to be explored. For each window type, the window function multiplies the signal samples before the FFT is taken. For the rectangular, Hanning, Hamming and Blackman windows, the form is:
[mag,phase,k] = winfft(x,rect);
[mag,phase,k] = winfft(x,hanning);
[mag,phase,k] = winfft(x,hamming);
[mag,phase,k] = winfft(x,blackman);
For the Kaiser window, the form is:
[mag,phase,k] = winfft(x,kaiser,beta);
?
Spectra for digital images may be obtained from a matrix of gray scale levels using Matlab’s fft2
您可能关注的文档
最近下载
- 苏教版数学四年级上册第五单元《解决问题的策略》大单元整体教学设计.pdf
- 小学英语新人教版PEP四年级上册全册教学反思(2025秋)2.doc
- 药物生产车间污染交叉污染混淆的防控课件.ppt VIP
- 齿轮传动及测量理论 .pptx
- 西南财经大学《高等数学》2016-2017第一学期期末试卷.pdf VIP
- 新闻采访与写作(绪论).ppt VIP
- 2022年7月份呼吸内科护士理论考核.docx VIP
- 广西南宁市2024-2025学年七年级上学期期末地理试卷(含答案).pdf VIP
- 高质量精品资料—高一数学函数的概念.ppt VIP
- 中职数学第6章《数列》单元检测试题及答案【基础模块下册】.docx VIP
原创力文档

文档评论(0)