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.
 
 
 
 

38 lines
775 B

  1. if (length(who("calibdata")) == 0)
  2. calibdata = load("../calibrate-25-second.log");
  3. endif
  4. if (length(who("a")) == 0)
  5. for i = 1 : (length(calibdata) / 4000)
  6. block=1:4000;
  7. a(i, block, 1) = calibdata((i-1) * 4000 + block, 2);
  8. a(i, block, 2) = calibdata((i-1) * 4000 + block, 3);
  9. a(i, block, 3) = calibdata((i-1) * 4000 + block, 1);
  10. endfor
  11. endif
  12. clf;
  13. figure(1);
  14. hold on
  15. #for i = 1:100
  16. # x(i) = a(i, 2000, 1);
  17. # y(i) = a(i, 2000, 3);
  18. #endfor
  19. #plot(x, [diff(y) 0]);
  20. for i = 50 : 50
  21. unclamped = 1000:3000;
  22. unclamped = 1:4000;
  23. x = a(i, unclamped, 1);
  24. y = a(i, unclamped, 2);
  25. filterlen = 1;
  26. y = filter(ones(1,filterlen)/filterlen,1,y);
  27. # y = [ diff(y) 0 ];
  28. plot(x(filterlen:(length(x)-1)), y(filterlen:(length(y)-1)));
  29. endfor