tsounakis

Lab Impulse Voltage

Apr 5th, 2022 (edited)
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.50 KB | None | 0 0
  1. %% ΑΘΑΝΑΣΙΟΣ ΤΣΟΥΝΑΚΗΣ 1072771
  2. %
  3. data = csvread('tek00010.csv')
  4. time = data(:,1)
  5. samples = data(:,2);
  6.  
  7. pl(time, samples, 'High impulse voltage as a function of time', 'Time (s)', 'Voltage (V)')
  8.  
  9. function [] = pl(x, y, t, xl, yl)
  10.     figure()
  11.     hold on
  12.    
  13.     plot(x, y, '.', 'color', 'r', 'MarkerSize', 1)
  14.     xlim([x(1),x(end)])
  15.  
  16.     title(t);
  17.     ylabel(yl);
  18.     xlabel(xl);
  19.     legend('Oscilloscope voltage measurements', 'Location', 'Southeast')
  20.     grid on
  21. end
  22.  
Add Comment
Please, Sign In to add comment