You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 line
591B

  1. %% Run the measurements
  2. data = transferFunction(oscilloscope,functiongenerator,f_start,f_stop,n_steps,amplitude);
  3. %% plot the data
  4. S = asymptote(S_smaller,S_larger,f,Fc);
  5. P = mod(P,pi);
  6. figure;
  7. subplot(2,1,1)
  8. semilogx(data.frequency,data.magnitude,f,A,f,S)
  9. ylabel('Magnitude [dB]','Fontsize',10);
  10. xlabel('Frequency [Hz]','Fontsize',10);
  11. legend('Measurement','Theory','Asymptote');
  12. grid on
  13. title('RC-circuit Bodeplot')
  14. subplot(2,1,2);
  15. semilogx(data.frequency,data.phase,f,P)
  16. ylabel('Phase [rad]','Fontsize',10);
  17. xlabel('Frequency [Hz]','Fontsize',10);
  18. legend('Measurement','Theory');
  19. grid on