Download presentation

Presentation is loading. Please wait.

Published byJarrod Silverstone Modified over 2 years ago

1
Lesson 5: More Formulae Basic Data Filtration

2
Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis of Data Mean, Mode, Median Standard Deviation Cross Correlation

3
Root Means Squared When used with a sliding window, smoothes data. RMS = sqrt(sum(all x^2)/n)

4
Using Root Means Squared

5
RMS With a Sliding Window

6
Filtering Data Goal of removing unwanted frequencies from signal data. Butterworth filters produce no ripple, but slowest roll-off. Elliptical filters produce steepest roll-off, but ripples in the pass and stop band. Typically, Butterworth Filters are the Filters of Choice.

7
Different Filters

8
Creating a Butterworth Filter

9
Effect of Order on the Filter

10
Rectification of Data Abs absolute value function

11
Statistical Functions Mean, std, xcorr

12
Programming Tips: Error Catching A program's Achilles Heel is unexpected data: Extra Data Missing Data Wrong Data Type It is easy to protect your programs from these sorts of errors by adding data checking loops.

13
Example: Array Length Check %Imagine that for this function, we know that there %should be only two numbers in the input array. function[sum] = addThemUp(summands) %If there aren't 2 numbers in the array, exit nicely. if(length(summands) ~= 2) disp('There weren't exactly 2 numbers in the input.') return; end sum = summands(1) + summands(2);

14
Example: Data Type Check %Now, let us add something to the previous function to %further ensure that it will work. function[sum] = addThemUp(summands) %If there aren't 2 numbers in the array, exit nicely. if(length(summands) ~= 2) disp('There weren't exactly 2 numbers in the input.') return; end %If one of the 2 "numbers" isn't a number, exit nicely. if(~(isnumeric(summands)) disp('One of the summands was not a number.') return; end sum = summands(1) + summands(2);

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google