-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlotA4D.m
47 lines (42 loc) · 1.53 KB
/
PlotA4D.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PURPOSE
% -> Plot a part of the 4D system matrix. To debug 'A4D'
% INPUT
% - A4D = (IP x IS) x (JB x JB)
% = De 4D system matrix
% - T = 1 x IT
% = The angular samples
% - S = 1 x IS
% = The radial samples
% OUTPUT
% - Plot of a part of the 4D system matrix
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function PlotA4D( A4D,T,S )
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[IP,IS,JB,~] = size(A4D);
P = T - pi/2;
dS = S(2) - S(1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for iP = 1:4 % A plot for 4 different phi
for iS = 1:4 % A plot voor 4 different s
subplot( 4,4, (iP-1)*4 + iS );
% Take an angular and radial sample
iip = ( 2*iP - 1)*IP/8;
iis = ( 2*iS - 1)*IS/8;
% Plot with: 'x' horizontal to the right and 'y' vertical up
% => Take the transpose
a = reshape( A4D(iip,iis,:,:), JB,JB )';
% Are all elements zero? => Skip this instance of the for-loop
if all(~a)
continue
end
contourf( a );
axis square;
xlabel('x'); ylabel('y')
title( [ '\phi = ', num2str(P(iip)*2*IP/pi), '\pi/', num2str(2*IP), ...
', s = ', num2str(S(iis)*2/dS), 'dS/2' ] )
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end