Add tests for IIRFilter.java, fix bug in setCoeffs method (#5590)

This commit is contained in:
Hardik Pawar
2024-10-07 18:47:27 +05:30
committed by GitHub
parent fa7d357451
commit a2457bd1ff
3 changed files with 86 additions and 1 deletions

View File

@ -58,7 +58,7 @@ public class IIRFilter {
throw new IllegalArgumentException("bCoeffs must be of size " + order + ", got " + bCoeffs.length);
}
for (int i = 0; i <= order; i++) {
for (int i = 0; i < order; i++) {
coeffsA[i] = aCoeffs[i];
coeffsB[i] = bCoeffs[i];
}