Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

34 rindas
842B

  1. oscilloscope.run;
  2. functiongenerator.frequency = frequency;
  3. functiongenerator.voltage = amplitude;
  4. functiongenerator.waveform = waveform;
  5. oscilloscope.trigger.source='ch1';
  6. oscilloscope.trigger.hfreject = 'on';
  7. clear ax;
  8. oscilloscope.auto;
  9. wave = oscilloscope.waveform;
  10. T = wave.sampletime;
  11. t = (0:T:T*(wave.length-1))*1000;
  12. ch1 = wave.ch1;
  13. ch2 = wave.ch2.*attenuation;
  14. figure;
  15. plot(t,ch1,t,ch2);
  16. title('Waveforms from Oscillscope')
  17. legend('Channel 1','Channel 2');
  18. xlabel('Time [ms]');
  19. ylabel('Amplitude [V]');
  20. ax(1) = gca;
  21. figure;
  22. ax(2) = subplot(2,1,1);
  23. plot(t,ch1)
  24. xlabel('Time [ms]');
  25. ylabel('Amplitude [V]');
  26. title('Channel 1 from Oscillscope')
  27. ax(3) = subplot(2,1,2);
  28. plot(t,ch2)
  29. xlabel('Time [ms]');
  30. ylabel('Amplitude [V]');
  31. title('Channel 2 from Oscillscope')
  32. linkaxes(ax(2:3));
  33. arrayfun(@(x) set(x,{'XGrid','YGrid'},{'on','on'}),ax)