add some verification against MATLAB output

Add a new test which checks that the output from the Python code matches that
of MATLAB to within machine precision.