[6db11f]: chirpzt.m  Maximize  Restore  History

Download this file

63 lines (51 with data), 1.4 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
function c = chirpzt(f,K,deltao,o,dim)
%CHIRPZT Chirped Z-transform
% Usage: c = chirpzt(f,o0,deltao,K,dim)
%
% Input parameters:
% f : Input data.
% K : Number of values.
% deltao : Angle increment.
% o : Starting angle.
%
% Output parameters:
% c : Coefficient vector.
%
% `c = chirpzt(f,o0,deltao,K)` computes *K* samples of the discrete-time
% fourier transform DTFT *c* of *f* at values $c(k)=F(o0+k*deltao)$
% for $k=0,\dots,K-1$.
%% Check the input arguments
if nargin < 1
error('%s: Not enough input arguments.',upper(mfilename))
end
if isempty(f)
error('%s: X must be a nonempty vector or a matrix.',upper(mfilename))
end
if nargin<5
dim=[];
end;
[f,~,Ls,~,dim,permutedsize,order]=assert_sigreshape_pre(f,[],dim,'CHIRPZT');
if nargin > 1 && ~isempty(K)
if ~isreal(K) || ~isscalar(K)
error('%s: o0 must be a real scalar.',upper(mfilename))
end
else
K = size(f,1);
end
if nargin > 2 && ~isempty(deltao)
if ~isreal(K) || ~isscalar(K)
error('%s: deltao must be a real scalar.',upper(mfilename))
end
else
deltao = 2*pi/K;
end
if nargin > 3 && ~isempty(o)
if ~isreal(K) || ~isscalar(K)
error('%s: o must be a real scalar.',upper(mfilename))
end
else
o = 0;
end
c = comp_chirpzt(f,K,deltao,o);
permutedsize(1)=K;
c=assert_sigreshape_post(c,dim,permutedsize,order);

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

Sign up for the SourceForge newsletter:





No, thanks