[D,S] = xlsread('ExData.xlsx'); t = D(:,1); s = D(:,2); figure plot(t,s) % Plot Original Signal grid Ts = mean(diff(t)); % Sampling Interval L = numel(t); Fs = 1/Ts; % Sampling Frequency Fn = Fs/2; % Nyquist Frequency smc = s-mean(s); % Subtract Mean (0 Hz) FTs = fft(smc)/L; % Fourier Transform Fv = linspace(0,1,fix(L/2)+1)*Fn; % Frequency Vector Iv = 1:numel(Fv); % Index Vector figure plot(Fv, abs(FTs(Iv))*2) % Plot Fourier Transform grid xlim([0 1]) Ws = 0.09/Fn; % Lowpass Stopband Frequency Wp = 0.08/Fn; % Lowpass Passband Frequency Rp = 1; % Passband Ripple Rs = 50; % Stopband Ripple & Attenuation [n,Wp] = ellipord(Wp,Ws,Rp,Rs); % Elliptical Filter Parameters [z,p,k] = ellip(n,Rp,Rs,Wp,'low'); % Elliptical Filter Design (Specify Lowpass) [sos,g] = zp2sos(z,p,k); % Second-Order-Section For Stability figure freqz(sos, 2^14, Fs) % Plot Filter Characteristics set(subplot(2,1,1),'XLim',[0 2.5]) set(subplot(2,1,2),'XLim',[0 2.5]) s_filt = filtfilt(sos,g,s); % Filter Signal figure plot(t, s_filt) % Plot Filtered Signal grid
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.