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

📄 tfr_bounds.m

📁 linear time-frequency toolbox
💻 M
字号:
function [AF,BF]=tfr_bounds(self,win,L);%TFR_BOUNDS  Calculate frame bounds%   Usage:  fcond=tfr_bounds(tfr);%           [A,B]=tfr_bounds(tfr,win);%           [A,B]=tfr_bounds(tfr,win,L);%%   Input parameters:%         tfr   : Time/frequency representation handle.%         L     : Length of transform to consider.%   Output parameters:%         fcond : Frame condition number (B/A)%         A,B   : Frame bounds.%%   TFR_BOUNDS(tfr) calculates the ratio B/A of the frame bounds of the%   frame specified by tfr. The analysis window is used.%%   TFR_BOUNDS(tfr,win) allows you to specify whether the analysis or synthesis%   window should be used. Setting win to 'analysis', 'a' or 1 will result in%   the analysis window being used, and setting win to 'synthesis','s' or 2%   will result in the synthesis window being used.%%   TFR_BOUNDS(tfr,win,L) or [A,B]=TFR_BOUNDS(tfr,win,L) does the same%   assuming a transform length of L. If L is not specified, the smallest%   possible transform length will be used. if nargin<1  error('To few input parameters.');end;if nargin>3  error('To many input parameters.');end;global TF_STORAGE;% Verify that TF_STORAGE has been initializedif prod(size(TF_STORAGE))==0  error('Please run TFR_CREATE to obtain a valid handle.');end;if nargin==1  win=1;end;switch win  case {'analyse','a',1}    win=1;  case {'synthesise','s',2}    win=2;  otherwise    error('Unknown window type.');end;% win now indicates the window to use, and 3-win will give% the other window.[winpos,L]=assert_winready(self,L,win,0,0,'TFR_BOUNDS');% Unpack what we needa=TF_STORAGE.data{self}.a;M=TF_STORAGE.data{self}.M;dgtinfo=TF_STORAGE.data{self}.dgtinfo;gf=TF_STORAGE.data{self}.w{winpos}.gf;L=L*dgtinfo.Lmul;lambdas=comp_gfeigs(gf,L,a,M);s=size(lambdas,1);  % Min and max eigenvalue.AF=lambdas(1);BF=lambdas(s);  % Possibly scale differently.  AF=AF/dgtinfo.winscale;BF=BF/dgtinfo.winscale;if nargout<2  AF=BF/AF;end;

⌨️ 快捷键说明

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