⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plotfft.m

📁 是“MATLAB混合编程与工程应用”一书的源码
💻 M
字号:
function PlotFFT(fftData, freq, powerSpect)
%PLOTFFT Plots the FFT and power spectral density data
%   PLOTFFT(FFTDATA, FREQ, POWERSPECT)
%   Plots the FFT and power spectral density from the specified data.
%   This file is used as an example for the .NET Builder
%   Language product.

%   Copyright 2001-2005 The MathWorks, Inc.
%   $Revision: 1.1.10.1 $  $Date: 2005/12/22 17:57:56 $

    len = length(fftData);
    if (len <= 0)
        return;
    end
    plot(freq(1:floor(len/2)), powerSpect(1:floor(len/2)))
    xlabel('Frequency (Hz)'), grid on
    title('Power spectral density')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -