forked from zhangt58/felscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreaddfl_show.m
44 lines (39 loc) · 939 Bytes
/
readdfl_show.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
%This script is used for showing the field pattern from the field ascfile
%first read the ascfile usually contains three cols, realpart imagpart and field intensity (fldinten)
fldinten = reshape(fldinten,ncar,ncar);
maxinten = max(realpart.^2+imagpart.^2);
fldinten = fldinten./maxinten;
[x, y] = meshgrid(1:ncar, 1:ncar);
%figure(1);
subplot(2,2,1);
surf(x,y,fldinten);
zlabel('Intensity');
shading interp
subplot(4,4,3);
pcolor(x,y,fldinten);
axis off
title('Intensity');
shading interp
%axis([1 ncar 1 ncar -0.1 1]);
realpart1 = reshape(realpart,ncar,ncar);
imagpart1 = reshape(imagpart,ncar,ncar);
%figure(2);
subplot(2,2,3);
surf(x,y,realpart1);
shading interp
zlabel('Realpart');
subplot(4,4,7);
pcolor(x,y,realpart1);
axis off
title('Realpart');
shading interp
%figure(3);
subplot(2,2,4);
surf(x,y,imagpart1);
shading interp
zlabel('Imagpart');
subplot(4,4,8);
pcolor(x,y,imagpart1);
axis off
title('Imagpart');
shading interp