你已经派生过 em3d-mt
镜像自地址
https://gitee.com/sduem/em3d-mt.git
已同步 2025-08-04 11:46:51 +08:00
57 行
1.8 KiB
Matlab
57 行
1.8 KiB
Matlab
function Mapdata_xyplane(data,rec,comp,F,name)
|
|
|
|
% load rec.mat
|
|
pointsize =100;
|
|
freq = unique(data.Frequency);
|
|
nfreq =size(freq,1);
|
|
|
|
for ifreq =9%6:nfreq
|
|
d = data(data.Frequency==freq(ifreq),:);
|
|
d_comp = F(d(:,comp).Variables);
|
|
|
|
d_comp = reshape(smoothdata(reshape(d_comp,41,[]), "lowess",5),[],1); %"gaussian" "movmedian" "movmean" "lowess"
|
|
|
|
% figure
|
|
scatter(rec(d.RX,1),rec(d.RX,2),pointsize, d_comp,'s',"filled");
|
|
% contourf(reshape(rec(:,2),41,[]),reshape(rec(:,3),41,[]),reshape( d_comp,41,[]),50,'LineStyle','none');
|
|
|
|
|
|
hold on;plot([-50 -50 50 50 -50],[50 -50 -50 50 50],'--w',LineWidth=2)
|
|
% hold on ; plot([-50 -50 50 50 -50],[20 65 65 20 20],'--w',LineWidth=2)
|
|
% Eul = plot([0 0],[-80 80],'g',[-80 80],[0 0],'r',LineWidth=2);
|
|
% rotate(Eul,[0 0 1],30)
|
|
|
|
if ismember(comp,{'phaXX' 'phaXY' 'phaYX' 'phaYY' } )
|
|
clim([20,45]);
|
|
elseif ismember(comp,{ 'rhoXY' 'rhoYX' } )
|
|
clim([2000,11000]);
|
|
elseif ismember(comp,{'rhoXX' ;'rhoYY' } )
|
|
clim([0,200]);
|
|
elseif ismember(comp,{'Tzx' ;'Tzy' } )
|
|
clim([-0.12,0.12]);
|
|
end
|
|
|
|
% colorbar;
|
|
colormap(jet );
|
|
set(gca,'FontSize',14,'FontWeight','bold','LineWidth',1.5)
|
|
|
|
set(gca,"YDir","reverse")
|
|
box on;
|
|
axis equal
|
|
% title([num2str(round(freq(ifreq)/1000)) ' kHz ' comp])
|
|
% ylabel('Y(m)'); xlabel('X(m)')
|
|
set(gca,'XTickLabel',[],'YTickLabel',[])
|
|
|
|
ylim([-210,210])
|
|
xlim([-210,210])
|
|
|
|
set(gca,'LooseInset',get(gca,"TightInset"))
|
|
% % set(gca,'LooseInset',[0.02 0.02 0.05 0.02])
|
|
% set(gcf,'Position',[680 578 560 283])
|
|
% set(gcf,'Position', [799 578 441 420])
|
|
|
|
% saveas(gcf, [num2str(round(freq(ifreq)/1000)) ' kHz ' func2str(F) ' ' comp name],'fig')
|
|
% saveas(gcf, [num2str(round(freq(ifreq)/1000)) ' kHz ' func2str(F) ' ' comp name],'tif')
|
|
|
|
end
|