[f1ff16]: comp / comp_dgtreal.m  Maximize  Restore  History

Download this file

48 lines (31 with data), 880 Bytes

 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
function c=comp_dgtreal(f,g,a,M,lt,phasetype)
%COMP_DGTREAL Compute a DGTREAL
% Usage: c=comp_dgt_real(f,g,a,M,lt,phasetype);
%
% Input parameters:
% f : Input data
% g : Window function.
% a : Length of time shift.
% M : Number of modulations.
% L : Length of transform to do.
% Output parameters:
% c : M*N array of coefficients.
%
% AUTHOR : Peter L. Søndergaard.
L=size(f,1);
W=size(f,2);
N=L/a;
M2=floor(M/2)+1;
if lt(2)==1
c = comp_sepdgtreal(f,g,a,M);
if phasetype==1
TimeInd = (0:(N-1))*a;
FreqInd = (0:(M2-1))/M;
phase = FreqInd'*TimeInd;
phase = exp(2*i*pi*phase);
c=bsxfun(@times,c,phase);
end;
else
% Quinqux lattice
c=comp_nonsepdgtreal_quinqux(f,g,a,M);
end;