-
Notifications
You must be signed in to change notification settings - Fork 4
/
congaussscript.tmp
70 lines (56 loc) · 1.61 KB
/
congaussscript.tmp
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
zi=-10;
xi=-10;
zf=10;
xf=10;
zstepfrac=0.1;
xstepfrac=0.1;
size=int32(((zf-zi)/(zstepfrac)+1));
eta=3;
eps2=10.0;
mu2=1.0;
thetai='PI/4.0';
g=[3.0];
for x=1:1
g(x) = round(g(x)*10^1)/(10^1);
end
sizesquare=int32(double(size)*double(size));
data=zeros(sizesquare, 4, 7);
for x=1:1
num2str(g(x), '%3.1f');
data(:,:,x) = load('data/PId4.0rads3eta3.0g10.0eps2gaussdielecfieldmap.dat');
end
for x=1:1
i=1;
j=1;
jcount=0;
eyarray=zeros(size,size);%this is the tranformed field modulus
eyrparray=zeros(size,size);%this is the transformed field real part
xarray=[xi:(xstepfrac):xf];
zarray=[zi:(zstepfrac):zf];
while (i <= size)
while (j<=size)
eyarray(i,j)=data((jcount* double(size) + j),3,x);
eyrparray(i,j)=data((jcount* double(size) + j),4,x);
j=j+1;
end
jcount=jcount+1;
i=i+1;
j=1;
end
k=imagesc(xarray,zarray,eyarray);
xlabel('x/lambda');
ylabel('z/lambda');
title(strcat('g=',num2str(g(1)),',thetai=',num2str(thetai),',mu1=1, mu2=',num2str(mu2),', eps1=1, eps2=',num2str(eps2),', eta=',num2str(eta) ));
colorbar;
line([xi xf],[eta eta],'linewidth',4,'Color', 'k');
line([xi xf],[0 0],'linewidth',4,'Color', 'k');
print('-dpng','plots/im_PId4.0rads3eta3.0g10.0eps2gaussdielecfieldmap.png');
k=imagesc(xarray,zarray,eyrparray);
xlabel('x/lambda');
ylabel('z/lambda');
title(strcat('real part: g=',num2str(g(1)),',thetai=',num2str(thetai),',mu1=1, mu2=',num2str(mu2),', eps1=1, eps2=',num2str(eps2),', eta=',num2str(eta) ));
colorbar;
line([xi xf],[eta eta],'linewidth',4,'Color', 'k');
line([xi xf],[0 0],'linewidth',4,'Color', 'k');
print('-dpng','plots/real_PId4.0rads3eta3.0g10.0eps2gaussdielecfieldmap.png');
end