你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Improved loading and selecting of correct EM field component.
这个提交包含在:
@@ -12,43 +12,42 @@ filename = fullfile(pathname, filename);
|
||||
if filename ~= 0
|
||||
iterations = double(h5readatt(filename, '/', 'Iterations'));
|
||||
dt = h5readatt(filename, '/', 'dt');
|
||||
Ex = h5read(filename, '/rxs/rx1/Ex')';
|
||||
Ey = h5read(filename, '/rxs/rx1/Ey')';
|
||||
Ez = h5read(filename, '/rxs/rx1/Ez')';
|
||||
end
|
||||
|
||||
prompt = 'Which field do you want to view? Ex, Ey, or Ez: ';
|
||||
field = input(prompt,'s');
|
||||
field = eval(field);
|
||||
time = 0:dt:iterations * dt;
|
||||
traces = 0:size(field,2);
|
||||
prompt = 'Which field do you want to view? Ex, Ey, or Ez: ';
|
||||
field = input(prompt,'s');
|
||||
fieldpath = strcat('/rxs/rx1/', field);
|
||||
field = h5read(filename, fieldpath)';
|
||||
time = 0:dt:iterations * dt;
|
||||
traces = 0:size(field,2);
|
||||
|
||||
fh1=figure('Name', filename);
|
||||
clims = [-max(max(abs(field))) max(max(abs(field)))];
|
||||
im = imagesc(traces, time, field, clims);
|
||||
xlabel('Trace number');
|
||||
ylabel('Time [s]');
|
||||
c = colorbar;
|
||||
c.Label.String = 'Field strength [V/m]';
|
||||
ax = gca;
|
||||
ax.FontSize = 16;
|
||||
xlim([0 traces(end)]);
|
||||
fh1=figure('Name', filename);
|
||||
clims = [-max(max(abs(field))) max(max(abs(field)))];
|
||||
im = imagesc(traces, time, field, clims);
|
||||
xlabel('Trace number');
|
||||
ylabel('Time [s]');
|
||||
c = colorbar;
|
||||
c.Label.String = 'Field strength [V/m]';
|
||||
ax = gca;
|
||||
ax.FontSize = 16;
|
||||
xlim([0 traces(end)]);
|
||||
|
||||
% Options to create a nice looking figure for display and printing
|
||||
set(fh1,'Color','white','Menubar','none');
|
||||
X = 60; % Paper size
|
||||
Y = 30; % Paper size
|
||||
xMargin = 0; % Left/right margins from page borders
|
||||
yMargin = 0; % Bottom/top margins from page borders
|
||||
xSize = X - 2*xMargin; % Figure size on paper (width & height)
|
||||
ySize = Y - 2*yMargin; % Figure size on paper (width & height)
|
||||
% Options to create a nice looking figure for display and printing
|
||||
set(fh1,'Color','white','Menubar','none');
|
||||
X = 60; % Paper size
|
||||
Y = 30; % Paper size
|
||||
xMargin = 0; % Left/right margins from page borders
|
||||
yMargin = 0; % Bottom/top margins from page borders
|
||||
xSize = X - 2*xMargin; % Figure size on paper (width & height)
|
||||
ySize = Y - 2*yMargin; % Figure size on paper (width & height)
|
||||
|
||||
% Figure size displayed on screen
|
||||
set(fh1, 'Units','centimeters', 'Position', [0 0 xSize ySize])
|
||||
movegui(fh1, 'center')
|
||||
% Figure size displayed on screen
|
||||
set(fh1, 'Units','centimeters', 'Position', [0 0 xSize ySize])
|
||||
movegui(fh1, 'center')
|
||||
|
||||
% Figure size printed on paper
|
||||
set(fh1,'PaperUnits', 'centimeters')
|
||||
set(fh1,'PaperSize', [X Y])
|
||||
set(fh1,'PaperPosition', [xMargin yMargin xSize ySize])
|
||||
set(fh1,'PaperOrientation', 'portrait')
|
||||
% Figure size printed on paper
|
||||
set(fh1,'PaperUnits', 'centimeters')
|
||||
set(fh1,'PaperSize', [X Y])
|
||||
set(fh1,'PaperPosition', [xMargin yMargin xSize ySize])
|
||||
set(fh1,'PaperOrientation', 'portrait')
|
||||
|
||||
end
|
在新工单中引用
屏蔽一个用户