Compiling MTEX

Explains how to compile MTEX on Mac, Linux, and Windows systems. This should not be necessary in most cases.

Introduction

MTEX is shipped with precompiled binaries for Mac OSX, Windows, and Linux, 32 and 64-bits. However, if these binaries are for some reason not compatible with your system, you have to compile them by hand. Compiling MTEX is not that easy and you are encouraged to contact the author if you have any problem.

Pre-requisites

Compiler

In order to install the MTEX toolbox you will have to compile it. Therefore you need a standard C compiler gcc and the make utility. You may also need the package named build-essentials. Under Linux and MAC OSX all these components can be easily installed using your favorite package manager. For Windows, we recommend the usage of MinGW and MSYS.

FFTW

The FFTW is one of the most popular fast Fourier transform libraries. For Linux and Mac OSX pre-compiled packages are available through your favorite package manager. The package is called fftw3 or similar. You will also need to install the header (developer) files. Alternatively, you can download the latest source directly from http://www.fftw.org and compile it on your computer. For Windows, this is the only way to go. Download the source code and compile it using MinGW.

NFFT

The NFFT is a C library for nonequispaced fast Fourier transforms including Fourier transforms on the sphere. It can be downloaded at http://www-user.tu-chemnitz.de/~potts/nfft and has to be installed by the following steps:

Compiling MTEX

Now you can compile the MTEX toolbox. This is done by

Checking Your Installation

Before starting MATLAB you can check whether the C programs were compiled successfully by typing

After the next start of MATLAB change to the MTEX path and enter

This should startup the MTEX toolbox. You can check your installation under MATLAB by typing

check_mtex
checking MTEX installation
this might take some time
 
simulating pole figures
 
pf = PoleFigure  
  crystal symmetry : m-3m
  specimen symmetry: 222
 
  h = (100), r = 1 x 206 points
  h = (110), r = 1 x 206 points
  h = (111), r = 1 x 206 points
  h = (211), r = 1 x 206 points
 
 
rec = ODF  
  crystal symmetry : m-3m
  specimen symmetry: 222
 
  Uniform portion:
    weight: 0.73004
 
  Radially symmetric portion:
    kernel: de la Vallee Poussin, halfwidth 10°
    center: 96 orientations, resolution: 10°
    weight: 0.26996
 
 
check reconstruction error: 
everythink seems to be ok!
Elapsed time is 1.022057 seconds.