lesson 5: more formulae basic data filtration. today's lesson filtering data with matlab root...
TRANSCRIPT
![Page 1: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/1.jpg)
Lesson 5: More Formulae
Basic Data Filtration
![Page 2: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/2.jpg)
Today's Lesson
Filtering Data with MatlabRoot Means SquaredButterworth Filters
Basic Statistical Analysis of DataMean, Mode, MedianStandard DeviationCross Correlation
![Page 3: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/3.jpg)
Root Means Squared
• When used with a sliding window, smoothes data.
• RMS = sqrt(sum(all x^2)/n)
![Page 4: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/4.jpg)
Using Root Means Squared
![Page 5: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/5.jpg)
RMS With a Sliding Window
![Page 6: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/6.jpg)
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.
![Page 7: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/7.jpg)
Different Filters
![Page 8: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/8.jpg)
Creating a Butterworth Filter
![Page 9: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/9.jpg)
Effect of Order on the Filter
![Page 10: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/10.jpg)
Rectification of Data
Abs absolute value function
![Page 11: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/11.jpg)
Statistical Functions
Mean, std, xcorr
![Page 12: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/12.jpg)
Programming Tips: Error CatchingA 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.
![Page 13: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/13.jpg)
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);
![Page 14: Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis](https://reader030.vdocuments.net/reader030/viewer/2022032517/56649ca15503460f9495f96e/html5/thumbnails/14.jpg)
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);