MTEX Changelog

MTEX 4.5 03/2017

3d orientation plots

MTEX 4.5 supports plotting of orientations, fibres, and ODFs in 3d in various projections like



*Grain Reconstruction

New option to handle non convex other shapes of EBSD data sets



New functions diag, trace,


Rotating, flipping of EBSD data is now done with respect to the center of the map. Previously all these opertions where done relatively to the point (0,0). Use


to get back the behavior of previous versions.


MTEXColorbar allows now to have a title next to it. Use

mtexColorbar('Title','this is a title')

Bug Fix This release contains several important bug fixes compare to MTEX 4.4.

MTEX 4.4 01/2017

Slip Systems

MTEX 4.4 introduces support for slip systems. Slip systems are defined by a plane normal and a slip direction

sSFCC = slipSystem(Miller(0,1,-1,cs,'uvw'),Miller(1,1,1,cs,'hkl'));

Slip systems are instrumental for computating the following properties


MTEX 4.4 adds support for fibres in orientation space. As an example the alpha fibre in cubic materials can be defined in the following ways

cs = crystalSymmetry('m-3m')
f  = fibre.alpha(cs)
f = fibre(Miller(1,0,0,cs),vector3d.X)
ori1 = orientation('Miller',[0 0 1],[1 1 0],cs);
ori2 = orientation('Miller',[1 1 1],[1 1 0],cs);
f = fibre(ori1,ori2)
f =[ori1,ori2,mean(ori1,ori2)])

All commands that took a pair of directions to specify a fibre, e.g., fibreODF, fibreVolume, plotFibre have been rewritten to accept a fibre as a single input argument. I.e. a fibre ODF is now defined by

odf = fibreODF(fibre.alpha(cs))

Up to now the following functions are implemented for fibres

  oR = fundamentalRegion(cs,cs)
  f = fibre(oR.V(1),oR.V(2))
  hold on
  hold off

Ignore Symmetry

Many functions support now the flag noSymmetry. Among them are angle, axis, dot, cunion.

Clustering of orientations

The new command cluster allows to cluster a given set of orientations into a given number of clusters.

% generate orientation clustered around 5 centers
cs = crystalSymmetry('m-3m');
center = orientation.rand(5,cs);
odf = unimodalODF(center,'halfwidth',5*degree)
ori = odf.calcOrientations(3000);
% find the clusters and its centers
[c,centerRec] = cluster(ori,'numCluster',5);
% visualize result
oR = fundamentalRegion(cs);
hold on
hold off

MTEX 4.3.2 07/2016

Alignment of Miller plots

You can now specify the alignment of the crystal a-axis or b-axis in Miller plots by

plota2north, plota2east, plota2south, plota2west
plotb2north, plotb2east, plotb2south, plotb2west

This might also be specify in mtex_settings.m mtex_settings.

MTEX 4.3 - 03/2016

Alignment of Miller plots

Starting with MTEX 4.3 plots with respect to the crystal coordinate system, i.e., inverse pole figure plots, misorientation axis plot, ipf keys, are always aligned such that the b-axis points towards east. This follows the convention given in the International Table of Crystallography. The alignment can be adjusted using the option xAxisAlignment


Plotting vector fields at grain centers or grain boundaries

There are three new commands

that allow visualizing directions for EBSD data, grains and at grain boundaries. The input argument dir should be a list of vector3d and may represent e.g. slip directions, polarization direction, etc.

EBSD data in raster format

Until MTEX 4.2 EBSD data have been always considered as a one-dimensional list of data, i.e., the often present structure of a regular grid was completely ignored. Starting with MTEX 4.3 EBSD data can be converted in a regular grid by

ebsd = ebsd.gridify

Missing data are represented as NaN in the regular representation. Gridified EBSD data may be addressed analogously like matrixes, i.e.,


will give pixel 100 in the y-direction and 200 in the x-direction. Analogously.


will give the stripe if pixels with y coordinate between 50 and 100.

Orientation gradients and GND

Gridified EBSD data allows also to compute orientation gradients by


as well as an estimate of the geometrically necessary dislocation density (GND) using the command calcGND


Auxilary new functionality

MTEX 4.2 - 11/2015

MTEX 4.2 introduces basic functionality for triple junction analysis in grain maps.

Triple points

Triple points are automatically computed during grain reconstruction and can be accessed by


More details on how to work with triple points can be found here.

large EBSD data sets

Analyzing large EBSD data sets may be quite annoying due to memory consumption and slow plotting. As a work around MTEX includes a new function reduce which allows reducing the data set to each n-th pixel, i.e.,

ebsd_small = reduce(ebsd,2)

contains only 25 percent of the data of the original data set. This functionality is assumed to be used for experimenting around with the data set and setting up a proper analysis script. The final analysis should, if possible, be done with the entire data set.

New option to ignore symmetry

When computing the angle between crystal directions, the misorientation angle between orientations and the misorientation axis symmetry can be ignored with the flag noSymmetry


Axis distributions in specimen coordinates

In order to plot axis distributions in specimen coordinates, you can now do

[ori1,ori2] = calcMisorientation(ebsd('phaseName'))


ori = ebsd(grains.boundary('indexed').ebsdId).orientations

New option to work around Matlab opengl bug

In mtex_settings.m mtex_settings there is a new option that may help to work around the Matlab opengl bug. Switching it of may give nicer graphics.


CSL misorientations

The function CSL requires now as a mandatory argument the crystal symmetry of the phase, i.e.


Grain boundaries

Grain boundaries segments have a new option midPoint which may be used for attaching a vector displaying the misorientation axis or some other direction.

More ODF sections

Along with the old syntax, there is now a new syntax that allows for more fine control of the ODF sections.

oS = phi2Sections(odf.CS,odf.SS)
oS.phi2 = [ 10*degree, 30*degree, 90*degree ];

Ordering of crystal symmetries

One can now check whether a crystal symmetry cs1 is a subgroup of crystal symmetry cs2 by

cs1 <= cs2

Further, the largest proper subgroup of some crystal symmetry cs is now accessible by


MTEX 4.1 - 09/2015

MTEX 4.1 introduces new possibilities to the analysis of misorientations. For the first time, it covers all geometric aspects of misorientations between arbitrary crystal symmetries. Furthermore, MTEX 4.1 introduces filters to smooth EBSD data.

Smoothing of EBSD Data

Smoothing of EBSD data might be necessary if the orientation data are corrupted by noise which influences the estimation of orientation dependent properties like KAM or GND. The general syntax for smoothing EBSD data is

ebsd = smooth(ebsd)

This applies the spline filter to the orientation data. Beside the spline filter, many other filters are available. A general discussion on this topic can be found here. To make use of a different than the dafault filter use the syntax

F = medianFilter
F.numNeighbours = 2 % this way options for the filter can be set
ebsd = smooth(ebsd,F)

The command smooth can also be used to fill not indexed measurement points. This behavior is enabled by the option fill

ebsd = smooth(ebsd,F,'fill')

Support for antipodal symmetry for misorientations

When working with boundary misorientations between the same phase one can not distinguish between a misorientation mori and its inverse |inv(mori). Starting with MTEX 4.1 this symmetry is supported for misorientations and misorientation distribution functions.

mori = inv(ori1) * ori2;
mori.antipodal = true;
mdf = calcMDF(odf1,odf2,'antipodal')

Antipodal symmetry effects the asymmetric region in orientation space as described below, as well as the distance between misorientations. Boundary misorientations between the same phase have set the flag antipodal by default.

Asymmetric regions in orientation space

MTEX 4.1 has now full support of asymmetric regions in orientation space. For any combination of crystal symmetries they can be defined by

oR = fundamentalRegion(cs1,cs2)

and visualized by


One can check, whether an orientation is within the fundamental region by


similarly as for a sphericalRegion. The fundamental region with antipodal symmetry is defined by.

oR = fundamentalRegion(cs1,cs2,'antipodal')

For a fixed rotational angle omega, the intersection of the fundamental region with the sphere with radius omega gives the fundamental sector for the corresponding rotational axes. The axis sector can be computed by

sR = oR.axisSector(omega)

Axis and angle distributions

Thanks to the implementation of the asymmetric region plotAxisDistribution and plotAngleDistribution works in MTEX 4.1 for any combination of crystal symmetries.

The following syntax is obsolete


As replacement use the more verbose syntax

mori = calcMisorientation(ebsd('phase1'),ebsd('phase2'))

Rotational axis in specimen coordinates

It is now possible to compute the misorientation axis between two orientations in specimen coordinate system. This is done by


To do so with random misorientations from an EBSD data set do

[ori1,ori2] = calcMisorientation(ebsd('phase1'),ebsd('phase2'))

Axis angle plots

(Mis)Orientation, ODFs, and MDFs can now be plotted in axis angles sections. Those plots respect the fundamental sector depending on the misorientation angle and for all combinations of crystal symmetries. The angle sections are scaled such that they represent the corresponding volume in orientation space. This can be switch off as described below


Replace plotODF by a plotSection

In most cases, you can replace plotODF by a|plot|. Only for misorientations, the default plot is scattered.

More default settings for EBSD maps and pole figure plots

pfAnnotations = @(varargin) text([vector3d.X,vector3d.Y],{'RD','ND'},...

Other improvements since MTEX 4.0.0

During the minor revisions of MTEX also several minor improvements have been added which are summarized below

[~,mP] = plot(ebsd)
mP.micronBar.visible = 'off'
a = axis(o1,o2)  % misorientation axis with respect to sample coordinate system
a = axis(inv(o2)*o1)  % misorientation axis with respect to crystal coordinate system
[x,y] = grains.boundary.intersect(xy1,xy2);
ebsd_prof = ebsd.spatialProfile(ebsd,some_line)
h = Miller({1,0,0},{1,1,1},{2,3,4},CS,'uvw')
gB.segmentLength % length of the corresponding connected segment
gB.isTwinning(mori,threshold) % check boundary for twinning

MTEX 4.0.0 - 10/2014

MTEX 4 is a complete rewrite of the internal class system which was required to keep MTEX compatible with upcoming Matlab releases. Note that MTEX 3.5 will not work on Matlab versions later than 2014a. As a positive side effect, the syntax has been made more consistent and powerful. On the bad side MTEX 3.5. code will need some adaption to run on MTEX 4. There are two general principles to consider

Use dot indexing instead of getting and setting methods

The syntax

h = get(m,'h')
m = set(m,'h',h+1)

is obsolete. set and get methods are not longer supported by any MTEX class. Instead use dot indexing

h = m.h
m.h = h + 1

Note, that this syntax can be nested, i.e., one can write


to get the rotational angle of all Forsterite orientations, or,


to get the x coordinate of the first crystallographic coordinate axis - the a-axis. As a nice bonus, you can now use TAB completion to cycle through all possible properties and methods of a class.

Use camelCaseCommands instead of under_score_commands

Formerly, MTEX used different naming conventions for functions. Starting with MTEX 4.0 all function names consisting of several words, have the first word spelled with lowercase letters and the consecutive words starting with a capital letter. Most notable changes are * plotPDF * plotIPDF * plotODF * calcError

Grain boundaries are now directly accessible

MTEX 4.0 introduces a new type of variables called grainBoundary which allows to represent arbitrary grain boundaries and to work with them as with grains. The following lines give some examples. Much more is possible.

% select boundary from specific grains
% select boundary by phase transistion
gB = grains.boundary('Forstarite','Enstatite')
% select boundary by misorientation angle
% compute misorientation angle distribution for specific grain boundaries

Plotting EBSD, grain, grainBoundary data has different syntax

The syntax of the plot commands has made more consistent throughout MTEX. It is now


where obj is the object to be plotted, i.e., EBSD data, grains, grain boundaries, spherical vectors, pole figures, etc., and the data are either pure numbers or RGB values describing the color. Examples are

% plot MAD values of EBSD data
% colorize grains according to area
% colorize grain boundary according to misorientation angle
gB = grains.boundary('Forsterite','Enstatite')

Colorization according to phase or phase transition is the new default when calling plot without data argument, i.e., the following results in a phase plot


In order to colorize ebsd data according to orientations, one has first to define an orientationMapping by

oM = ipdfHSVOrientationMapping(ebsd('Forsterite'))

Then one can use the command oM.orientation2color to compute RGB values for the orientations


The orientation mapping can be visualized by


EBSD data are always spatially indexed

Starting with MTEX 4.0 EBSD data alway have to have x and y coordinates. EBSD data without spatial coordinates are imported simply as orientations. As a consequence, all orientation related functionalities of EBSD data have been moved to orientations, i.e., you can not do anymore


But instead you have to explicitely state that you operate on the orientations, i.e.


This makes it more easy to apply the same functions to misorientations to grain mean orientations grains.meanOrientation, ebsd misorientation to mean mean |ebsd.mis2mean or boundary misorientations grains.boundary.misorientation

Different syntax for reconstructing grains from EBSD data

In MTEX 3.5 the command

grains = calcGrains(ebsd)

duplicates the ebsd data into the grain variable allowing to access the EBSD data belonging to a specific grain by


In MTEX 4.0 the command calcGrains returns as an additional output the list of grainIds that is associated with the EBSD data. When storing these grainIds directly inside the EBSD data, i.e., by

[grains,ebsd.grainId] calcGrains(ebsd)

one can access the EBSD data belonging to a specific grain by the command


MTEX 4.0 distinguishes between crystal and specimen symmetry

In MTEX 4.0 two new variable types specimenSymmetry and crystalSymmetry have been introduced to distinguish clearly between these two types of symmetry. Calling

cs = symmetry('m-3m')
ss = symmetry('triclinic')

is not allowed anymore! Please use instead

cs = crystalSymmetry('m-3m','mineral','phaseName')
ss = specimenSymmetry('triclinic')

Pole figure indexing is now analogously to EBSD data

You can now index pole figure data by conditions in the same manner as EBSD data. E.g. the condition

condition = pf.r.theta < 80 * degree

is an index to all pole figure data with a polar angle smaller than 80 degree. To restrict the pole figure variable pf to the data write

pf_restrcited = pf(condition)

In the same manner, we can also remove all negative intensities

condition = pf.intensities < 0
pf(condition) = []

In order to address individuell pole figures within a array of pole figures pf use the syntax




The old syntax


for accessing the first pole figure will not work anymore as it now refers to the first pole figure measurement. The direct replacement for the above command is


MTEX 4.0 supports all 32 point groups

In MTEX 4.0 it is for the first time possible to calculate with reflections and inversions. As a consequence, all 32 point groups are supported. This is particularly important when working with piezoelectric tensors and symmetries like 4mm. Moreover, MTEX distinguishes between the point groups 112, 121, 112 up to -3m1 and -31m.

Care should be taken, when using non-Laue groups for pole figure or EBSD data.

Support for three-digit notation for Miller indices of trigonal symmetries

MTEX 4.0 understands now uvw and UVTW notation for trigonal symmetries. The following two commands define the same crystallographic direction, namely the a1-axis


Improved graphics

MTEX can now display colorbars next to pole figure, tensor or ODF plots and offers much more powerfull options to customize the plots with titles, legends, etc.

Functionality that has been (temporarily) removed

This can be seen as a todo list.

MTEX 3.5.0 - 12/2013

Misorientation colorcoding


Fast multiscale clustering (FMC) method for grain reconstruction

grains = calcGrains(ebsd,'FMC')

Misc changes

poly = [ [x1,y1];[x2,y2];[xn,yn];[x1,y1] ]
grains = calcGrains(ebsd,'boundary',poly)
poly = selectPolygon

Bug fixes

MTEX 3.4.2 - 06/2013

bugfix release

MTEX 3.4.1 - 04/2013

bugfix release

MTEX 3.4.0 - 03/2013

New plotting engine

MTEX 3.4 features a completely rewritten plotting engine. New features include

plotzOutOfPlane, plotzIntoPlane
ax = subplot(2,2,1)

Colormap handling

mtexColorMap red2blue


[modes, values] = calcModes(odf,n)

EBSD data

% convert spatial coordinates to Euler angle coordinate system
% convert Euler angles to spatial coordinate system
CS = symmetry('cubic','mineral','Mg','color','red')
inpolygon(ebsd,[xmin ymin xmax ymax])


R = SchmidTensor(m,n)
[tauMax,mActive,nActive,tau,ind] = calcShearStress(stressTensor,m,n,'symmetrise')
% extract entry 1,1,1,1 in tensor notation
% extract entry 1,1 in Voigt notation
% extract the first tensor

Import / Export

v = loadVector3d('fname','ColumnNames',{'x','y','z'})
v = loadVector3d('fname','ColumnNames',{'latitude','longitude'})



has been replaced by


MTEX 3.3.2 - 01/2013

bugfix release

MTEX 3.3.1 - 07/2012

bugfix release

MTEX 3.3.0 - 06/2012

Grains: change of internal representation

Reimplementation of the whole grain part:



The behavior of the 'ignorePhase' changed. Now it is called in general 'not indexed' and the not indexed data is imported generally. If the crystal symmetry of an EBSD phase is set to a string value, it will be treated as not indexed. e.g. mark the first phase as 'not indexed'

CS = {'not indexed',...

By default, calcGrains does also use the 'not Indexed' phase.


MTEX 3.2.3 - 03/2012

bugfix release

MTEX 3.2.1 - 11/2011

New Features

Bug Fixes

MTEX 3.2 - 05/2011

3d EBSD Analysis

This release for the first time supports 3d EBSD data. In particular, MTEX is now able to

Misorientation Analysis

New Syntax for EBSD and grain variables

EBSD and grain variables can now be indexed by phase, region or grain / ebsd variables. Let us assume we have a two phase ebsd variable containing 'Fe' and 'Mg' then can restrict our dataset to the Fe - phase only by writing


The same works with grains and also with more than one phase. Please have a look into the documentation for information how to index ebsd and grain variables.

Accordingly the following syntax is now depreciated.


It should be replaced by


Other Enhangments

MTEX 3.1 - 03/2011

Tensor Arithmetics This release introduces tensor analysis into MTEX, this includes

Other Enhancements

MTEX 3.0 - 10/2010

Crystal Geometry

This release contains a completely redesigned crystal geometry engine which is thought to be much more intuitive and flexible. In particular, it introduces two new classes rotation and orientation which make it much easier to work with crystal orientations. Resulting features are

Other Enhancements

MTEX 2.0 - 10/2009

Grain Analysis for EBSD Data

MTEX is now able to partition spatial EBSD data into grains. This allows for the computation of various grain characteristics, as well as the computation and visualization of the grain boundaries and neighborhood relationships. Main features are:

Visualization Improvements

General Improvements

Incompatible Changes to Previous Versions

MTEX 1.2 - 05/2009

Improved EBSD import

Improved EBSD plotting

General Improvements

Incompatible Changes to Previous Versions

MTEX 1.1 - 12/2008

Improved Import Wizzard

Improved Pole Figure Analysis

Improved EBSD Data Support

Improved Plotting

Bug Fixes

MTEX 1.0 - 06/2008

New Installer Including Binaries for Windows, Linux, and Max OSX

New ODF Class

New Interfaces

Improved Plotting

Incompatible Changes With Previous Releases

Improved Documentation

MTEX comes now with over 500 help pages explaining the mathematical concepts, the philosophy behind MTEX and the syntax and usage of all 300 functions available in MTEX. Furthermore, you find numerous examples and tutorials on ODF estimation, data import, calculation of texture characteristics, ODF and pole figure plotting, etc.

Bug Fixes

MTEX 0.4 - 04/2008

Speed Improvements

New Support of EBSD Data Analysis

New Functions

Incompatible Changes With Previous Releases

MTEX 0.3 - 10/2007

MTEX 0.2 - 07/2007

MTEX 0.1 - 03/2007