📄 show_pos.m
字号:
function show_pos(oGd, pos)
% SHOW_POS(oGd, positions)
% Shows the positions of sources and testing points for geometry oGd and
% position coordinates positions.
hold off
iCurve = 1:length(pos.testing);
plot([pos.testing(iCurve).vX], [pos.testing(iCurve).vY], 'bx')
hold on
nSd = length(pos.sources);
vEr = zeros(1, nSd);
for iSd = 1:nSd
if isnumeric(oGd.sdArray(iSd).Er)
vEr(iSd) = oGd.sdArray(iSd).Er;
else
vEr(iSd) = base26(oGd.sdArray(iSd).Er);
end
end
[vUniqueEr, indI, indJ] = unique(vEr);
nUnique = length(vUniqueEr);
map = equimap(nUnique);
for iUnique = 1:nUnique
color = map(indJ(iUnique),:);
iSd = find(indJ==iUnique);
plot([pos.sources(iSd).vX], [pos.sources(iSd).vY], '.', 'Color', color)
end
axis equal
ax = axis;
axis(expand_axis(ax,1.1));
axis equal
sLegend = 'Testing Points';
for ind = 1:nUnique
iSd = find(indJ==ind);
if isnumeric(oGd.sdArray(iSd(1)).Er)
sLegend = strvcat(sLegend, ['Sources for \epsilon_r =' ...
num2str(vUniqueEr(ind)) ' region']);
else
sLegend = strvcat(sLegend, ['Sources for ' oGd.sdArray(iSd(1)).Er ...
' region']);
end
end
draw_geom(oGd, 'noaxischange')
h = legend(sLegend, 'location', 'best');
fixfonts(h, 10);
axis equal
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -