Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- disp("ZAD5");
- low = fir1(120, 0.375, 'low');
- high = fir1(120, 0.375, 'high');
- flow = filter(low, 1, sygnal);
- fhigh = filter(high, 1, sygnal);
- subplot(5, 2, 6);
- plot(abs(fft(fhigh)), 'b');
- title('Filtracja dolnoprzepustowa');
- grid on
- subplot(5, 2, 8);
- plot(abs(fft(flow)), 'r');
- title('Filtracja górnoprzepustowa');
- grid on
- flow = decimate(flow, 10);
- fhigh = decimate(fhigh, 10);
- for k=1:2:length(flow)
- wykres(k) = flow((k+1)/2);
- end
- for k=2:2:length(flow)
- wykres(k) = fhigh(k/2);
- end
- subplot(5, 2, 9);
- plot(0:fp/length(wykres):(length(wykres)-1)*fp/length(wykres),abs(fft(wykres)));
- xlabel('częstotliwość [Hz]')
- ylabel('amplituda')
- grid on
- title('widmo amplitudowe sygnału po połączeniu sygnałów')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement