Watch this Author's files
Works, but relies on two simulink functions; would be good to remove this dependency. I did a temporary hack as below (x-y spirals still work, but I have clearly disabled some functionality).
%rotate= vrrotvec([0 0 1],pl); %rm = vrrotvec2mat(rotate); rm = eye(3); % Added
Contact us at files@mathworks.com