Advertisement
makispaiktis

Course 3 - Align signals

Sep 1st, 2023 (edited)
1,179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.65 KB | None | 0 0
  1. clear all
  2. close all
  3. clc
  4.  
  5. % 1. Load the dataset
  6. load processedsignals.mat
  7.  
  8. % 2. Find Delay Function ---> Positive output means that the first signal is BEFORE the second one
  9. finddelay(harp,pax)
  10. finddelay(harp,wanc)
  11. finddelay(pax,wanc)
  12.  
  13. % harp arrived 596 samples after pax
  14. % harp arrived 1167 samples before wanc
  15. % pax arrived 1770 samples before wanc
  16. % So the wanc signal arrived last.
  17.  
  18. % 3. Align Signals Function ---> More clear visualization of peeks
  19. [harp, wanc] = alignsignals(harp, wanc);
  20. [pax, wanc] = alignsignals(pax, wanc);
  21.  
  22. % 4. Plot
  23. plot(harp)
  24. hold on
  25. plot(pax)
  26. plot(wanc)
  27. hold off
  28. legend("HARP","PAX","WANC")
  29. ylim([-0.3 0.3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement