Thanks for the contribution, the code is quite readable and nicely done.
After tinkering with images, that have been rotated/scaled/translated, I noted some discrepancies between theoretically identical results and your script's output. The following lines in fecture_vec.m need to be corrected to:
M7=(3*n21-n03)*(n30+n12)*[(n30+n12)^2-3*(n21+n03)^2]+(3*n12-n30)*(n03+n21)*[ 3*(n30+n12)^2-(n21+n03)^2 ];
I got the formulas from "Digital Image Processing" by Gonzalez/Woods (and they work just fine) but didn't verify with Hu's paper.