hdw09 / filtfilt Goto Github PK
View Code? Open in Web Editor NEWWe wirte a filtflit function in java . The filtflit's output is the same as it's in Matlab .
We wirte a filtflit function in java . The filtflit's output is the same as it's in Matlab .
我用的是Python版本filtfilt是scipy.signal.filtfilt函数,然后我发现输出和你的对应不上,然后我就从网上搜索看到了Matlab和Python在滤波过程中的差异,会在函数计算中差0.3个相位差,所以在Python函数中 output = signal.filtfilt(b,a,x,padlen=3*(max(len(b),len(a))-1)
就可以得到一样的输出了。Matlab中不支持更改padlen(参考http://dong.sh/posts/differencefiltfiltfunction/)
I use Java and MATLAB to test result of filtfilt(). But unfortunately they are not the same. Please refer to the attached file for result of filtfilt()
Java_filtfilt_output_30.txt
MATLAB_filtfilt_30_result.txt
filtfilt_test_30.zip
td_30.txt
Test.zip
.
你好,请问有java实现的butter函数吗,返回参数b和a
I try to compile filtfilt-java on Ubunut 20.04. But it failed to compile with the following error message.
Could you let me know which environment do you use for compiling filtfilt-java?
javac ./Test.java
./Test.java:5: error: cannot find symbol
import com.iiphci.dsp.Filtfilt;
^
symbol: class Filtfilt
location: package com.iiphci.dsp
./Test.java:33: error: cannot find symbol
ArrayList y = Filtfilt.doFiltfilt(B,A,X);
^
symbol: variable Filtfilt
location: class Test
2 errors
加班ing。。。
c++版本我用了一下,设置了5阶36输入,然后输出和MATLAB根本就不同,我还以为是我哪里弄错了,用不同的阶数又试了几遍,还是错的,怎么能这么坑。你发出来不应该检测一下程序的正确性吗。
做eeg的信号滤波,用了3s的数据,第一次filter之后就已经出现了0.02的偏差,最后的filtfilt和matlab的filtfilt相差甚远。
我花了点时间做了数据比较,输入的数据是一致的,但是这个偏差值会越来越大,目测是filter中的zi计算导致的。
Hello, first of all thank you for this java code. However, ı found a bug filter method in Filtfilt class. the part of the bug code is
changeArray(A, A.get(0));
changeArray(B, A.get(0));
when A.get(0) was 1 value then B values does not change.
So ı change it.
New code is
double a0 = A.get(0);
changeArray(A, a0);
changeArray(B, a0);
I use C++ and MATLAB to test result of filtfilt(). But unfortunately they are not the same. Please refer to the attached file for result of filtfilt().
C++_filtfilt_output_30.txt
MATLAB_filtfilt_30_result.txt
filtfilt_test_30.m.zip
td_30.txt
filtfilt.zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.