SHARE
TWEET

Untitled

a guest Jun 16th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %data
  2. global accumulateData
  3.  
  4. %status
  5. global stat
  6. stat = true;
  7. if(stat == true)
  8.     %h = addlistener(s, 'DataAvailable', @plotData);
  9.     h =  @plotData;  
  10. end
  11.  
  12. %Transmit 3 times every 2 seconds
  13. for i = (1:3)-1
  14.  
  15.     if i == 3
  16.         fprintf("endn");
  17.         pause(2)
  18.         stat = false;
  19.         exit();
  20.     end
  21.     fprintf("Transmitn");
  22.     pause(2);
  23. end
  24.  
  25.  
  26. function plotData(src, event)
  27.    %plot(event.TimeStamps, event.Data);
  28.    fprintf("plotn");
  29. end
  30.      
  31. >> untitled
  32. Transmit
  33. Transmit
  34. Transmit
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top