Hey, thanks so much for sharing this code! It helps me a lot.
but I have one single question:
Can you give a recommendation for a tolerance value, for a conversion from rotationmatrix to Eulerangles?
That's bad. My second last posting was totally deleted by MATLAB Central, possibly because it contained special characters...
I wrote that in your latest release of SpinCalc, you introduced a new bug in line 238.
In that line (which I cannot copy here because it contains special characters), you should use the element-by-element OR operator (single vertical bar), rather than the short-circuit OR operator (double bar) which does not work when N is greater than 1.
In short, you should go back to previous version of line 238.
Please also check my 4 advices posted yesterday.