/DOC/UAFWLIS Manual Example/Ex5/plotting_S11.m
http://ua-fwlis.googlecode.com/ · MATLAB · 81 lines · 56 code · 9 blank · 16 comment · 1 complexity · 1f58982306152327faa5dab0cbde14d3 MD5 · raw file
- %m-file used to plot S11
- clear all;close all;clc
- set(0,'defaultaxesfontsize',15);
-
- flag=input('Please enter 1 first and 2 then:');
-
- if flag==1
- s11=load ('OUTPUT_S11.dat');
- s12=load ('OUTPUT_S12.dat');
-
- temp='S11_UA';
- Out2File(s11,temp)
- temp='S12_UA';
- Out2File(s12,temp)
- else
- S11_UA=load('S11_UA.txt');
- S12_UA=load('S12_UA.txt');
-
-
- S11_HFSS=load('S11_HFSS.txt');
- S12_HFSS=load('S12_HFSS.txt');
-
- % % HFSS_2=load('.\ex1\ExamS11_2.txt');
- % % HFSS_P2=load('.\ex1\ExamPhaseS11_2.txt');
- %
- % S_ADS=load('ADS_2.txt');
- % % %%% Frequency
- % F_ADS=S_ADS(:,1)/10^9;
- % % for p=1:length(s);
- % % Pmn(p)=p;
- % % aa(p)=s(p,1);
- % % bb(p)=s(p,2);
- % % cc(p)= s(p,3);
- % % end
- % %F=4:0.1:25;
- S11_ADS=load('Ex5_S11_ADS.txt');
- PhS11_ADS=load('Ex5_PhS11_ADS.txt');
- S12_ADS=load('Ex5_S12_ADS.txt');
- PhS12_ADS=load('Ex5_PhS12_ADS.txt');
-
- %
- figure(1);
- plot (S11_UA(:,1),S11_UA(:,3),'b','linewidth',2);
- xlabel('Frequency (GHz)')
- ylabel('S11 Phase(degree)')
- grid on;hold on;
- plot(S11_HFSS(:,1),S11_HFSS(:,3),'-.r','linewidth',2)
- plot(PhS11_ADS(:,1)/1e9,PhS11_ADS(:,2),'--k','linewidth',2)
- legend('UA-FWLIS','HFSS','ADS')
- axis([5 12 -200 200]);
- %pause;
- figure(2);
- plot (S11_UA(:,1),S11_UA(:,2),'b','linewidth',2);
- xlabel('Frequency (GHz)')
- ylabel('S11 Magnitude (dB)')
- grid on;hold on;
- plot(S11_HFSS(:,1),S11_HFSS(:,2),'-.r','linewidth',2)
- plot(S11_ADS(:,1)/1e9,S11_ADS(:,2),'--k','linewidth',2)
- legend('UA-FWLIS','HFSS','ADS')
- axis([5 12 -20 0])
-
- figure(3);
- plot (S12_UA(:,1),S12_UA(:,3),'b','linewidth',2);
- xlabel('Frequency (GHz)')
- ylabel('S12 Phase(degree)')
- grid on;hold on;
- plot(S12_HFSS(:,1),S12_HFSS(:,3),'-.r','linewidth',2)
- plot(PhS12_ADS(:,1)/1e9,PhS12_ADS(:,2),'--k','linewidth',2)
- legend('UA-FWLIS','HFSS','ADS')
- axis([5 12 -200 200])
-
- figure(4);
- plot (S12_UA(:,1),S12_UA(:,2),'b','linewidth',2);
- xlabel('Frequency (GHz)')
- ylabel('S12 Magnitude (dB)')
- grid on;hold on;
- plot(S12_HFSS(:,1),S12_HFSS(:,2),'-.r','linewidth',2)
- plot(S12_ADS(:,1)/1e9,S12_ADS(:,2),'--k','linewidth',2)
- legend('UA-FWLIS','HFSS','ADS')
- axis([5 12 -100 0])
- end