function data = transferFunction(oscilloscope,functiongenerator,f_start,f_stop,n_steps,amplitude)
%TRANSFERFUNCTION Summary of this function goes here
%   Detailed explanation goes here

f_array = linspace(f_start,f_stop,n_steps);
data = zeros(n_steps,1);
functiongenerator.voltage = amplitude;
functiongenerator.waveform = 'SINUSOID';
oscilloscope.enable_channels;
oscilloscope.trigger.source = 'CH1';
oscilloscope.setMeasurement(1,'phase');
oscilloscope.setMeasurement(2,'peak');
oscilloscope.setMeasurement(3,'peak','ch2');

for i = 1:n_steps
    functiongenerator.frequency = f_array(i);
    oscilloscope.auto;
    data(i) = oscilloscope.getMeasurement(1);
end
end

