%% Run the measurements data = transferFunction(oscilloscope,functiongenerator,f_start,f_stop,n_steps,amplitude); %% plot the data S = asymptote(S_smaller,S_larger,f,Fc); P = mod(P,pi); figure; subplot(2,1,1) semilogx(data.frequency,data.magnitude,f,A,f,S) ylabel('Magnitude [dB]','Fontsize',10); xlabel('Frequency [Hz]','Fontsize',10); legend('Measurement','Theory','Asymptote'); grid on title('RC-circuit Bodeplot') subplot(2,1,2); semilogx(data.frequency,data.phase,f,P) ylabel('Phase [rad]','Fontsize',10); xlabel('Frequency [Hz]','Fontsize',10); legend('Measurement','Theory'); grid on