-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlotMultiWigner_alt.m
143 lines (126 loc) · 6.71 KB
/
PlotMultiWigner_alt.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
function [] = PlotMultiWigner( mat , x , hamfunc )
%PlotMultiWigner Plots Multiple WignerFunctions
% USAGE: [] = PlotMultiWigner( mat , x , hamfunc )
%
% INPUT:
% mat : vectors
% x : time-axis
% hamfunc : Hamiltonian function to plot contour
%
% OUTPUT:
%
% AUTHOR: D Lantzberg, Nov. 2017
cmap = [
1.00000000000000e+000 1.00000000000000e+000 1.00000000000000e+000
1.00000000000000e+000 1.00000000000000e+000 1.00000000000000e+000
1.00000000000000e+000 1.00000000000000e+000 1.00000000000000e+000
1.00000000000000e+000 1.00000000000000e+000 1.00000000000000e+000
1.00000000000000e+000 1.00000000000000e+000 1.00000000000000e+000
875.000000000000e-003 875.000000000000e-003 1.00000000000000e+000
750.000000000000e-003 750.000000000000e-003 1.00000000000000e+000
625.000000000000e-003 625.000000000000e-003 1.00000000000000e+000
500.000000000000e-003 500.000000000000e-003 1.00000000000000e+000
375.000000000000e-003 375.000000000000e-003 1.00000000000000e+000
250.000000000000e-003 250.000000000000e-003 1.00000000000000e+000
125.000000000000e-003 125.000000000000e-003 1.00000000000000e+000
0.00000000000000e+000 0.00000000000000e+000 1.00000000000000e+000
0.00000000000000e+000 90.9090936183929e-003 1.00000000000000e+000
0.00000000000000e+000 181.818187236786e-003 1.00000000000000e+000
0.00000000000000e+000 272.727280855179e-003 1.00000000000000e+000
0.00000000000000e+000 363.636374473572e-003 1.00000000000000e+000
0.00000000000000e+000 454.545468091965e-003 1.00000000000000e+000
0.00000000000000e+000 545.454561710358e-003 1.00000000000000e+000
0.00000000000000e+000 636.363625526428e-003 1.00000000000000e+000
0.00000000000000e+000 727.272748947144e-003 1.00000000000000e+000
0.00000000000000e+000 818.181812763214e-003 1.00000000000000e+000
0.00000000000000e+000 909.090936183929e-003 1.00000000000000e+000
0.00000000000000e+000 1.00000000000000e+000 1.00000000000000e+000
62.5000000000000e-003 1.00000000000000e+000 937.500000000000e-003
125.000000000000e-003 1.00000000000000e+000 875.000000000000e-003
187.500000000000e-003 1.00000000000000e+000 812.500000000000e-003
250.000000000000e-003 1.00000000000000e+000 750.000000000000e-003
312.500000000000e-003 1.00000000000000e+000 687.500000000000e-003
375.000000000000e-003 1.00000000000000e+000 625.000000000000e-003
437.500000000000e-003 1.00000000000000e+000 562.500000000000e-003
500.000000000000e-003 1.00000000000000e+000 500.000000000000e-003
562.500000000000e-003 1.00000000000000e+000 437.500000000000e-003
625.000000000000e-003 1.00000000000000e+000 375.000000000000e-003
687.500000000000e-003 1.00000000000000e+000 312.500000000000e-003
750.000000000000e-003 1.00000000000000e+000 250.000000000000e-003
812.500000000000e-003 1.00000000000000e+000 187.500000000000e-003
875.000000000000e-003 1.00000000000000e+000 125.000000000000e-003
937.500000000000e-003 1.00000000000000e+000 62.5000000000000e-003
1.00000000000000e+000 1.00000000000000e+000 0.00000000000000e+000
1.00000000000000e+000 937.500000000000e-003 0.00000000000000e+000
1.00000000000000e+000 875.000000000000e-003 0.00000000000000e+000
1.00000000000000e+000 812.500000000000e-003 0.00000000000000e+000
1.00000000000000e+000 750.000000000000e-003 0.00000000000000e+000
1.00000000000000e+000 687.500000000000e-003 0.00000000000000e+000
1.00000000000000e+000 625.000000000000e-003 0.00000000000000e+000
1.00000000000000e+000 562.500000000000e-003 0.00000000000000e+000
1.00000000000000e+000 500.000000000000e-003 0.00000000000000e+000
1.00000000000000e+000 437.500000000000e-003 0.00000000000000e+000
1.00000000000000e+000 375.000000000000e-003 0.00000000000000e+000
1.00000000000000e+000 312.500000000000e-003 0.00000000000000e+000
1.00000000000000e+000 250.000000000000e-003 0.00000000000000e+000
1.00000000000000e+000 187.500000000000e-003 0.00000000000000e+000
1.00000000000000e+000 125.000000000000e-003 0.00000000000000e+000
1.00000000000000e+000 62.5000000000000e-003 0.00000000000000e+000
1.00000000000000e+000 0.00000000000000e+000 0.00000000000000e+000
937.500000000000e-003 0.00000000000000e+000 0.00000000000000e+000
875.000000000000e-003 0.00000000000000e+000 0.00000000000000e+000
812.500000000000e-003 0.00000000000000e+000 0.00000000000000e+000
750.000000000000e-003 0.00000000000000e+000 0.00000000000000e+000
687.500000000000e-003 0.00000000000000e+000 0.00000000000000e+000
625.000000000000e-003 0.00000000000000e+000 0.00000000000000e+000
562.500000000000e-003 0.00000000000000e+000 0.00000000000000e+000
500.000000000000e-003 0.00000000000000e+000 0.00000000000000e+000
];
clear colormap;
colormap(cmap);
Wf = mat2wigner( Rank1P(mat) );
fhat = fftshift(fft(ifftshift(mat,1),[],1),1)/sqrt(length(mat));
y = time2freq(x);
left = .03;
right = .03;
top = .03;
bottom= .03;
space = .03;%.025;
widthMain = 0.7;
heightMain= 0.7;
widthFreq = 0.2;
heightFreq= 0.7;
widthTime = 0.7;
heightTime= 0.2;
positionVectorMain = [ left , bottom , ...
widthMain , heightMain ];
positionVectorFreq = [ left+widthMain+space , bottom , ...
widthFreq , heightFreq ];
positionVectorTime = [ left , bottom+heightMain+space , ...
widthTime , heightTime ];
axMain = subplot('Position',positionVectorMain);
colormap(cmap);
imagesc(x/2,-y/2,abs(Wf)*100000000000000);
[XX,YY] = meshgrid(x,y);
colormap(cmap);
hold on, contour(XX/2,YY/2,hamfunc(XX/2,YY/2),-6.5:1:6.5,'k-'), hold off
box on;
xlabel('q');
ylabel('p');
plotaxis(0);
axis xy;
grid;
axFreq = subplot('Position',positionVectorFreq);
plot(abs(fhat.').^2,y,'k','LineWidth',1.25);
plotaxis(0);
grid;
axTime = subplot('Position',positionVectorTime);
plot( x , abs(mat).^2 ,'k','LineWidth',1.25);
plotaxis(0);
grid;
linkaxes( [axMain axTime] , 'x' );
linkaxes( [axMain axFreq] , 'y' );
axis(axMain,[x(1) x(end) y(1) y(end)]/2);
axis(axTime,[x(1)/2 ,x(end)/2, -max(max(abs(mat)).^2)*0,max(max(abs(mat)))*1.1]);
axis(axFreq,[-max(max(abs(fhat).^2))*0, max(max(abs(fhat).^2))*1.1,x(1)/2 ,x(end)/2]);
end