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

📄 spec1.m

📁 该工具箱为时频分析中的一类重要变换,离散时频分布的工具箱,其中提供基本算法的程序.可直接应用
💻 M
字号:
 function [tfd, t, f] = spec1(x, fs, nfreq, w)% spec1 -- Compute samples of the type I spectrogram.%%  Usage%    [tfd, t, f] = spec1(x, fs, nfreq, w)%%  Inputs%    x     signal vector%    fs    sampling frequency of x (optional, default is 1 sample/second)%    nfreq number of samples to compute in frequency (optional, default%          is 2^nextpow2(length(w)) )%    w     window vector, must have an odd length (optional, default is a %          circular Gaussian window)%%  Outputs%    tfd  matrix containing the spectrogram of signal x (optional)%    t    vector of sampling times (optional)%    f    vector of frequency values (optional)%% To compute a true type I spectrogram one must oversample the signal and % window by a factor of two.  For almost all purposes one should use spec2.% If no output arguments are specified, then the spectrogram is% displayed using ptfd(tfd, t, f).% Copyright (C) -- see DiscreteTFDs/Copyrightdisp('Warning: you should probably be using spec2 instead of spec1!')error(nargchk(1, 4, nargin));if (nargin == 1)  [tfd, t, f] = stft1(x);elseif (nargin == 2)  [tfd, t, f] = stft1(x, fs);elseif (nargin == 3)  [tfd, t, f] = stft1(x, fs, nfreq);elseif (nargin == 4)  [tfd, t, f] = stft1(x, fs, nfreq, w);endtfd = real(tfd.*conj(tfd));if (nargout == 0)  ptfd(tfd, t, f);  clear tfdend

⌨️ 快捷键说明

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