Presentation on theme: "Lesson 5: More Formulae Basic Data Filtration. Today's Lesson Filtering Data with Matlab Root Means Squared Butterworth Filters Basic Statistical Analysis."— Presentation transcript:
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.
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.
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);
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);
Your consent to our cookies if you continue to use this website.