Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

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

Download this file

comp_idgtreal.m    49 lines (35 with data), 953 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
44
45
46
47
function f=comp_idgtreal(coef,g,a,M,lt,phasetype)
%COMP_IDGTREAL Compute IDGTREAL
% Usage: f=comp_idgtreal(c,g,a,M,lt,phasetype);
%
% Input parameters:
% c : Array of coefficients.
% g : Window function.
% a : Length of time shift.
% M : Number of modulations.
% lt : lattice type
% Output parameters:
% f : Signal.
%
% AUTHOR : Peter L. Søndergaard.
% TESTING: TEST_DGT
% REFERENCE: OK
N=size(coef,2);
L=N*a;
b=L/M;
M2=floor(M/2)+1;
M2short=ceil(M/2);
if lt(2)==1
if phasetype==1
TimeInd = (0:(N-1))/N;
FreqInd = (0:(M2-1))*b;
phase = FreqInd'*TimeInd;
phase = exp(-2*i*pi*phase);
% Handle multisignals
coef = bsxfun(@times,coef,phase);
end;
f = comp_isepdgtreal(coef,g,L,a,M);
else
% Quinqux lattice
f=comp_inonsepdgtreal_quinqux(coef,g,a,M);
end;