Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.70 KB | None | 0 0
  1. disp("ZAD5");
  2. low = fir1(120, 0.375, 'low');
  3. high = fir1(120, 0.375, 'high');
  4. flow = filter(low, 1, sygnal);
  5. fhigh = filter(high, 1, sygnal);
  6. subplot(5, 2, 6);
  7. plot(abs(fft(fhigh)), 'b');
  8. title('Filtracja dolnoprzepustowa');
  9. grid on
  10. subplot(5, 2, 8);
  11. plot(abs(fft(flow)), 'r');
  12. title('Filtracja górnoprzepustowa');
  13. grid on
  14.  
  15. flow = decimate(flow, 10);
  16. fhigh = decimate(fhigh, 10);
  17.  
  18. for k=1:2:length(flow)
  19.     wykres(k) = flow((k+1)/2);
  20. end
  21. for k=2:2:length(flow)
  22.     wykres(k) = fhigh(k/2);
  23. end
  24.  
  25. subplot(5, 2, 9);
  26. plot(0:fp/length(wykres):(length(wykres)-1)*fp/length(wykres),abs(fft(wykres)));
  27. xlabel('częstotliwość [Hz]')
  28. ylabel('amplituda')
  29. grid on
  30. title('widmo amplitudowe sygnału po połączeniu sygnałów')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement