Coefficients from butter function differ between platforms
Show older comments
I've into something I find odd.
When comparing results with a colleague, we discovered some differences even though we ran the same code and had the same Matlab version (9.0.0.341360 (R2016a)). In the end, we tracked down the culprit to be the coefficients calculated by Matlab's built-in function: butter.
[b,a]=butter(4,[15/(8000/2),100/(8000/2)])
On Windows we get:
b =
1.0e-05 *
0.1140 0 -0.4560 0 0.6841 0 -0.4560 0 0.1140
On Linux we get
b =
1.0e-05 *
0.1139 0 -0.4558 0 0.6836 0 -0.4558 0 0.1139
I haven't tested to see if these differences extend to other filter functions but I was surprised to see this difference. Is this normal behaviour? Can anybody offer an explanation? :-)
I have some toolboxes on Windows which aren't present on Linux. I doubt this is the reason though?
----- I found someone having a similar problem, though this was due to different versions of Signal Processing Toolbox. I've since check that we have the same version of the Signal Processing Toolbox on Linux and Windows: Signal Processing Toolbox Version 7.2 (R2016a)
Link so solution: https://se.mathworks.com/matlabcentral/answers/98640-why-does-the-butter-function-return-different-results-for-signal-processing-toolbox-4-3-and-5-0?s_tid=srchtitle
-----
I still find this behaviour strange, when both systems have the same version of the toolbox.
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!