The signal file is of 20Hz sampling rate. Each row is a signal, i needed to to apply bandpass filter to each row and convert it in the frequency range 0.34 - 1 Hz.
D = load('ehgSignal.mat'); s = D.val'; Fs = 20; % Sampling Frequency (Hz) Fn = Fs/2; % Nyquist Frequency (Hz) Wp = [0.34 1.00]/Fn; % Passband Frequencies (Normalised) Ws = [0.30 1.05]/Fn; % Stopband Frequencies (Normalised) Rp = 10; % Passband Ripple (dB) Rs = 50; % Stopband Ripple (dB) [n,Ws] = cheb2ord(Wp,Ws,Rp,Rs); % Filter Order [z,p,k] = cheby2(n,Rs,Ws); % Filter Design [sosbp,gbp] = zp2sos(z,p,k); % Convert To Second-Order-Section For Stability figure(1) freqz(sosbp, 2^16, Fs) % Filter Bode Plot tv = linspace(0, 1, length(s))/Fs; % Time Vector (s) s_filt = filtfilt(sosbp,gbp, s); % Filter Signal figure(2) plot(tv, s_filt) grid
NOTE — The filtfilt function will operate on the first non-singleton dimension of ‘s’, so since ‘s’ is (12 x 35220), it is necessary to transpose it to filter along the rows ( columns in the transposed matrix).
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.