forked from ltfat/ltfat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrgramian.m
41 lines (37 loc) · 1.44 KB
/
frgramian.m
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
function o = frgramian(c, Fa, Fs)
%FRGRAMIAN Frame Gramian operator
% Usage: o=frgramian(c, F);
% o=frgramian(c, Fa, Fs);
%
% Input parameters:
% c : Input coefficients
% Fa : Analysis frame
% Fs : Synthesis frame
%
% Output parameters:
% o : Output coefficients
%
% `o=frgramian(c,F)` applies the Gramian operator or Gram matrix of the
% frame *F*. The entries of the Gram matrix are the inner products of the
% frame elements of *F*. The frame must have been created using |frame|.
% If the frame *F* is a Parseval frame, the Gramian operator is a projection
% onto the range of the frame analysis operator.
%
% `o=frgramian(c, Fa, Fs)` applies the (cross) Gramian operator with the
% frames *Fa* and *Fs*. Here *Fs* is the frame associated with the frame
% synthesis operator and *Fa* the frame that is associated with the
% frame analysis operator. The entries of the matrix that is constructed
% through the Gramian operator are the inner products of the frame
% elements of *Fa* and *Fs*.
% If *Fa* and *Fs* are canonical dual frames, the Gramian operator is a
% projection onto the range of the frame analysis operator.
%
% AUTHOR: Jordy van Velthoven
complainif_notenoughargs(nargin, 2, 'FRGRAMIAN');
complainif_notvalidframeobj(Fa,'FRGRAMIAN');
if (nargin == 2)
Fs = Fa;
else
complainif_notvalidframeobj(Fs,'FRGRAMIAN');
end;
o = frana(Fa, frsyn(Fs, c));