-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtest_zeros.m
60 lines (40 loc) · 900 Bytes
/
test_zeros.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
clear all
close all
addpath('./ST')
N = 500;
mu = 1e-4;
x = 0.01 * randn(1, N);
t = 1:N;
Nh = 301; %81; %127;% short-time window length
m_max = N/2;
w = tftb_window(Nh,'Kaiser');
%[sp,rs] = tfrrsp(x,1:length(x),Nf,w);
%[tfr,a,b] = tfrlsp(x(:),t,N,w);
seuil = 1e-2;
[tfr,rtfr,hat] = tfrlmrgab(x(:), t, N, mu, Nh);
R_n = repmat(1:N, N,1); %% time
R_m = repmat((1:N).', 1,N); %% frequency
r = 1j * R_n + R_m;
%r = zeros(size(tfr));
[I,J] = find(abs(hat-r) < seuil);
nb_z = length(I);
figure(979)
imagesc(abs(tfr))
colormap gray;
colormap(flipud(colormap));
hold on
plot(I, J, 'rx');
%%%%%%%%%%%%%%%%%%%
x2 = x + real(fmconst(N, 0.2)).';
[tfr2,rtfr2,hat2] = tfrlmrgab(x2(:), t, N, mu, Nh);
[I2,J2] = find(abs(hat2-r) < seuil);
figure(980)
imagesc(abs(tfr2))
colormap gray;
colormap(flipud(colormap));
hold on
plot(I2, J2, 'rx');
figure
plot(I, J, 'rx');
hold on
plot(I2, J2, 'g.');