% Author: Nilesh Kamdar
% This file tests the two functions:
% hp8510c and fdata

[S11, S21, S12, S22, f] = hp8510c('Rd_lab2_.1');  % Put your filename here
[ldata, vdata, pdata] = fdata(S11); % to see S12, S21, S22, etc. change this line here

plot(f,ldata);title('Log Magnitude of S11');xlabel('frequency (Hz)');ylabel('Log Magnitude of S11');
figure;
plot(f,vdata);title('Linear Magnitude of VSWR');xlabel('frequency (Hz)');ylabel('VSWR');
figure;
plot(f,pdata);title('Phase of S11');xlabel('frequency (Hz)');ylabel('Phase of S11 (degrees)');

   