Created
February 7, 2012 15:02
-
-
Save tobin/1760109 to your computer and use it in GitHub Desktop.
Apply a matrix of second order section digital filters to a timeseries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function y = applysos(soscoef, x) | |
| % Apply a matrix of SOS cofficients to some time series. | |
| % | |
| % Tobin Fricke | |
| % 2012-02-07 | |
| if size(soscoef,2) ~= 6 | |
| error('soscoef is not the right size'); | |
| end | |
| y = x; | |
| for ii=1:size(soscoef,1) | |
| y = filter(soscoef(ii,1:3), soscoef(ii,4:6), y); | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment