function to fit Bingham parameters
confidence ellipse for the mean direction based on Tanaka (1999) https://doi.org/10.1186/BF03351601
BS2 = BinghamS2.fit(v)
% simulate some directions odf = unimodalODF(quaternion.id,'halfwidth',10*degree); N = 100; v = odf.discreteSample(N) .* ... rotation.byAxisAngle(vector3d.X,rand(N,1)*2*pi) * vector3d.Y;
% fit a Bingham distribution S2F = BinghamS2.fit(v)
S2F = BinghamS2