Hi,

I had a question regarding saving S11 and S21 measurement data as trace files (S2P and CTI) to my PC from my network analyzer (Agilent N5242A PNA-X) using Matlab.

I would like to transfer the data to Matlab, then save it once in Matlab.

here is the code I'm working with: (as you can tell, I'm also new to programming with the VNA.)

If anyone could help it would be greatly appreciated.

Thanks!

-Tony

ps: Also, for some reason I have to make my measurement in Trace 2, because I get an error if I try to make it in Trace 1

I had a question regarding saving S11 and S21 measurement data as trace files (S2P and CTI) to my PC from my network analyzer (Agilent N5242A PNA-X) using Matlab.

I would like to transfer the data to Matlab, then save it once in Matlab.

here is the code I'm working with: (as you can tell, I'm also new to programming with the VNA.)

If anyone could help it would be greatly appreciated.

Thanks!

-Tony

ps: Also, for some reason I have to make my measurement in Trace 2, because I get an error if I try to make it in Trace 1

Your code only reads the second traces data because the first trace is never made active. To make the 1st trace active after a cal you would use the 'CALC1:PAR:SEL "CH1_S11_1"' then read the data from the measurement.