[34f3ea]: comp / comp_transferfunction.m  Maximize  Restore  History

Download this file

28 lines (19 with data), 539 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
function H=comp_transferfunction(g,L)
%COMP_TRANSFERFUNCTION Compute the transfer function
l=(0:L-1).'/L;
if isfield(g,'h')
g_time=circshift(postpad(g.h,L),g.offset).*...
exp(2*pi*1i*round(g.centre*L/2)*l);
if g.realonly
g_time=real(g_time);
end;
H=fft(g_time);
else
if ~isnumeric(g.H)
g.H=g.H(L);
end;
H=circshift(postpad(g.H,L),g.foff(L)).*exp(-2*pi*1i*round(g.delay)*l);
if g.realonly
H=(H+involute(H))/2;
end;
end;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks