Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[f1f034]: nonstatgab / nsgabframebounds.m Maximize Restore History

Download this file

nsgabframebounds.m    49 lines (43 with data), 1.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
function [AF,BF]=nsgabframebounds(g,a,M)
%NSGABFRAMEBOUNDS Frame bounds of nonstationnary Gabor frame
% Usage: fcond=nsgabframebounds(g,a,M);
% [A,B]=nsgabframebounds(g,a,M);
%
% Input parameters:
% g : Cell array of windows
% a : Vector of time positions of windows.
% M : Vector of numbers of frequency channels.
% Output parameters:
% fcond : Frame condition number ($B/A$)
% A,B : Frame bounds.
%
% `nsgabframebounds(g,a,Ls)` calculates the ratio $B/A$ of the frame
% bounds of the nonstationary discrete Gabor frame defined by windows
% given in *g* at positions given by *a*. Please see the help on |nsdgt|
% for a more thourough description of *g* and *a*.
%
% `[A,B]=nsgabframebounds(g,a,Ls)` returns the actual frame bounds *A*
% and *B* instead of just the their ratio.
%
% The computed frame bounds are only valid for the 'painless case' when
% the number of frequency channels used for computation of |nsdgt| is greater
% than or equal to the window length. This correspond to cases for which
% the frame operator is diagonal.
%
% See also: nsgabtight, nsdgt, insdgt
%
% References: ltfatnote018
% AUTHOR : Florent Jaillet
% TESTING: TEST_NSDGT
% Compute the diagonal of the frame operator.
f=nsgabframediag(g,a,M);
AF=min(f);
BF=max(f);
if nargout<2
% Avoid the potential warning about division by zero.
if AF==0
AF=Inf;
else
AF=BF/AF;
end;
end;