function plotMeasurements clear all,clc,close all % Field radiated by the horn antenna ..................... % load Erad_horn.mat %Emeas x2 y2 freq % for n=1:201 % EmeasL=Emeas(:,:,n); EmeasL=EmeasL(:); datos=[x2(:) y2(:) real(EmeasL) imag(EmeasL)]; % save(['Erad_horn_f_' num2str(freq(n)/1e6) 'MHz.txt'],'datos','-ascii','-tabs'); % end freq=[12000:30:18000]*1e6; nx=131; ny=161; Emeas=zeros(nx,ny,numel(freq)); for n=1:201 datos=load(['Erad_horn_f_' num2str(freq(n)/1e6) 'MHz.txt']); Emeas(:,:,n)=reshape(datos(:,3),nx,ny)+j*reshape(datos(:,4),nx,ny); x2=reshape(datos(:,1),nx,ny); y2=reshape(datos(:,2),nx,ny); end x2h=x2; y2h=y2; freqH=freq; % Scattered field ............... % load Escatt_meas.mat %Chirp3D x2 y2 freq % for n=1:201 % EmeasL=Chirp3D(:,:,n); EmeasL=EmeasL(:); datos=[x2(:) y2(:) real(EmeasL) imag(EmeasL)]; % save(['Escatt_meas_f_' num2str(freq(n)*1000) 'MHz.txt'],'datos','-ascii','-tabs'); % end freq=[12000:30:18000]*1e6; ny=41; nx=66; Chirp3D=zeros(ny,nx,numel(freq)); for n=1:201 datos=load(['Escatt_meas_f_' num2str(freq(n)/1e6) 'MHz.txt']); Chirp3D(:,:,n)=reshape(datos(:,3),ny,nx)+j*reshape(datos(:,4),ny,nx); x2=reshape(datos(:,1),nx,ny); y2=reshape(datos(:,2),nx,ny); end for n=1:numel(freq) figure(1) subplot(2,2,1); pcolor(x2',y2',20*log10(abs(Chirp3D(:,:,n)))); colormap jet; colorbar; grid on; axis image; shading interp; box on; caxis([-50 -10]); xlabel('x axis (m)'); ylabel('y axis (m)'); title(['Scattering measurements. S_{21}, amplitude, in dB. f = ' num2str(freq(n)) ' GHz']); subplot(2,2,2); pcolor(x2',y2',angle(Chirp3D(:,:,n))*180/pi); colormap jet; colorbar; grid on; axis image; shading interp; box on; caxis([-180 180]); xlabel('x axis (m)'); ylabel('y axis (m)'); title(['Scattering measurements. S_{21}, phase, in degrees. f = ' num2str(freq(n)) ' GHz']); subplot(2,2,3); pcolor(x2h,y2h,20*log10(abs(Emeas(:,:,n)))); colormap jet; colorbar; grid on; axis image; shading interp; box on; caxis([-50 -10]); xlabel('x axis (m)'); ylabel('y axis (m)'); title(['Near field of the horn antenna (z = 50 cm above the aperture). Amplitude, in dB. f = ' num2str(freqH(n)/1e9) ' GHz']); subplot(2,2,4); pcolor(x2h,y2h,angle(Emeas(:,:,n))*180/pi); colormap jet; colorbar; grid on; axis image; shading interp; box on; caxis([-180 180]); xlabel('x axis (m)'); ylabel('y axis (m)'); title(['Near field of the horn antenna (z = 50 cm above the aperture). Phse, in degrees. f = ' num2str(freqH(n)/1e9) ' GHz']); pause(0.2); end