function [ msg ] = keysight_measure_vpp(channel,ipaddress) %KEYSIGHT_MEASURE_VPP Summary of this function goes here % Detailed explanation goes here if nargin < 2 t = keysight_connect(); else t = keysight_connect(ipaddress); if nargin < 1 channel = 1; end end fprintf(t,':autoscale'); fprintf(t,'*OPC?'); fscanf(t); fprintf(t,[':meas:vamp? chan' num2str(channel)]); msg = str2double(fscanf(t)); if msg > 9e+37 msg = NaN; end keysight_disconnect(t); end