Hampel filter (built-in) in matlab 2016b way faster than the one from the file exchange
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all,
I am using a 32 bit pc for my analysis, which limits me to matlab 2015. The hampel filter is introduced in matlab 2016.
There is a hampel filter in the file exchange which produced the same results compared to 2016.
https://nl.mathworks.com/matlabcentral/fileexchange/34795-outlier-detection-and-removal--hampel-
However, this filter needs to have the input of the time as well. Not a real problem, but for some reason this filter lasts about 100 seconds (1500000 points) while in matlab 2016 it only lasts a few seconds.
due to privacy I can't use the 2016 pc so I hope there is a solution for this! :)
Greetings Martijn
3 Kommentare
Greg Dionne
am 22 Mär. 2017
OK. Have you tried the MEX file FEX submission that does the uniformly-sampled version? Put it in a directory and do "mex hampelFilter.cpp" and try running it. Hopefully it will compile and work ok.
It seemed to work fine for me:
>> mex hampelFilter.cpp
Building with 'Microsoft Visual C++ 2015 Professional'.
MEX completed successfully.
>> data=[1 2 3 15 5 6 7 8 9 10];
>> hampelFilter(data, 3, 3)
ans =
1 2 3 5 5 6 7 8 9 10
Antworten (1)
Jan
am 22 Mär. 2017
Bearbeitet: Jan
am 22 Mär. 2017
The main work inside Matlab's hampel function is done in movmad.mexw64, a compiled executable for Windows 64. There is no chance to run it on a 32 bit system.
There is some potential to improve the FEX version. Most of all replacing the moving median filter by a C-mex function. To check if more simplifications are possible:
- Is your x always 1:numel(data)?
- Do you use the 'standard' or the 'adaptive' method?
0 Kommentare
Siehe auch
Kategorien
Mehr zu Verification, Validation, and Test finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!