%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Data analysis of mesurment done with the Tectronix anayser %%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Done with DSA8200 Digital serial anayser

clear, close all;
cable_s21  = csvread('cable_S21.csv',1);
new8x8_s21 = csvread('new8x8_S21.csv',1);
old8x8_s21 = csvread('old8x8_S21.csv',1);
tang_s21   = csvread('tang_S21.csv',1);

x(1) = max(size(cable_s21));
x(2) = max(size(new8x8_s21));
x(3) = max(size(old8x8_s21));
x(4) = max(size(tang_s21));
xmax = min(x);

figure (1)
hold on;
semilogx(cable_s21(1:xmax,1),cable_s21(1:xmax,2),'b');
semilogx(new8x8_s21(1:xmax,1),new8x8_s21(1:xmax,2),'r');
semilogx(old8x8_s21(1:xmax,1),old8x8_s21(1:xmax,2),'g');
semilogx(tang_s21(1:xmax,1),tang_s21(1:xmax,2),'k');
grid on;


