t = data(:,1); % column corresponding to time (block of 60s) Accel = data(:,2:end); % three columns corresponding to x, y, z (accelerometer data) srate = 5000; % Hz (need to figure out how to downsample to 100Hz) Fs = 1/srate; % Sampling Rate (in Hz) Fn =Fs/2; % Nyquist Frequency (in Hz) coeff = pca(Accel); % Need to obtain the most dominant (movement-centred) axis of tremor acceleration; use first component for all subsequent analyses %2nd order Butterworth filter between 3-15 Hz Wp = [3 15]/Fn; % Norrmalised Passband Frequencies Ws = [1.5 15.99]/Fn; % Normalised Stopband Frequencies Rp = 1; % Passband Ripple (dB) Rs = 25; % Stopband Ripple (dB) [n,Wn] = buttord(Wp, Ws, Rp, Rs); % Optimal Filter Order [b,a] = butter(n, Wn); % Calculate Filter Coefficients [sos,g] = tf2sos(b,a); % Convert To Second-Order Sections For Stability figure(1) freqz(sos, 4096, Fs) % Filter Bode Plot
srate = 5000;
[b,a] = butter(n, Wn); % Calculate Filter Coefficients [sos,g] = tf2sos(b,a); % Convert To Second-Order Sections For Stability
[z.p,k]] = butter(n, Wn); % Calculate Filter Coefficients [sos,g] = zp2sos(b,a); % Convert To Second-Order Sections For Stability
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.