Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 % Dejam.m 30 Apr 2012 % Load given data file load('jamming.mat'); % Assume jamming accomplished by addition with fixed frequency tone(s) % (Have a quick look at the spectrum and see what we see) figure; pwelch(signal, [],[],[], Fs); % Ah ha! Two prominant spectral peaks are visible... together with some % (lower level) features in the human speech range of frequencies. % Create filters to notch out the tones... % (I initially tried simple low-pass filtering, but it muddied the audio % to the point of unintelligibility). The number of poles & bandwidths % were simply educated guesses and by no means optimal. filt1 = fdesign.notch('N,F0,BW', 10, 500, 100, Fs); % 500 Hz filt2 = fdesign.notch('N,F0,BW', 10, 5000, 100, Fs); % 5 kHz oneToneGone = filter(design(filt1), signal); bothTonesGone = filter(design(filt2), oneToneGone); % Check the spectrum again to make sure the filters did their job... figure; pwelch(bothTonesGone, [],[],[], Fs); % Neat! Let's listen... sound(bothTonesGone, Fs); % "DSP is cool" eh? Yes, it is :)