Since the Euler angles are the most common way to describe orientations MTEX implements them such that the Euler angles of an MTEX orientation coincide with the Euler angles of a Bunge orientation. Thus the Euler angles of orientations in MTEX agree with the Euler angles reported by all common EBSD devices, simulation software, text books and paper."
xlsfilename=[pname '\filename.xls'];
grainexport = included_glaucophane;
Gnt_hostId = included_glaucophane.hostId;
%garnet (Gnt) host euler
HostEuler =grains(Gnt_hostId).meanOrientation.Euler;
Hostphi1 = HostEuler(:,1);
HostPhi = HostEuler(:,2);
Hostphi2 = HostEuler(:,3);
% Gln (glaucophane) Euler
GlnEuler =included_glaucophane.meanOrientation.Euler;
Glnphi1 = GlnEuler(:,1);
GlnPhi = GlnEuler(:,2);
Glnphi2 = GlnEuler(:,3);
varnames ={'Gnt_hostId', 'GlnId', 'Hostphi1','HostPhi','Hostphi2','Glnphi1','GlnPhi','Glnphi2'}
n=length(varnames)
grains_props =cell(length(grainexport),n);
for i=1:n
grains_props(:,i)=num2cell(eval(varnames{i}));
end
graintable=cell2table(grains_props,'VariableNames',varnames)
% write this to an excel spreadsheet
writetable(graintable,xlsfilename,'sheet','grainprops')