%% 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) hold on semilogx(f,A,f,S) hold off ylabel('Magnitude [dB]','Fontsize',10); xlabel('Frequency [Hz]','Fontsize',10); legend('Measurement','Theory','Asymptote'); grid on title('RLC-circuit Bodeplot') subplot(2,1,2); semilogx(data.frequency,data.phase) hold on semilogx(f,P) hold off ylabel('Phase [rad]','Fontsize',10); xlabel('Frequency [Hz]','Fontsize',10); legend('Measurement','Theory'); grid on