---
name: "mcdisplay-matlab"
section: "1"
platform: "linux"
package: "mcstas-mcdisplay-matlab"
version: "3.5+3.5.19+ds5-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mcdisplay-matlab"
---

# mcdisplay-matlab(1)

mcstas Graphical display of simulations using Matlab/Octave

## NAME

**mcdisplay-matlab** - mcstas Graphical display of simulations using Matlab/Octave

## SYNOPSIS

**mcdisplay-matlab** \[-hom\] \[-png\|-jpg\|-fig\|-eps\|-pdf\|-tif\] \[–inspect=COMP\] INSTR name=value...

## DESCRIPTION

The **mcdisplay-matlab** front-end is a graphical debugging tool. It presents a schematic drawing of the instrument definition, showing the position of the components and the paths of the simulated neutrons through the instrument. It is thus very useful for debugging a simulation, for example to spot components in the wrong position or to find out where neutrons are getting lost. To use the **mcdisplay-matlab** front-end with a simulation, run it as follows: `mcdisplay INSTR args...` where INSTR is the name of either the instrument source `INSTR.instr` or the simulation program `INSTR.out` generated with mcstas, and `args` are the normal command line arguments for the simulation, as for *mcrun*. The `-h` option will list valid options.

The default plotting backend is `mxdisplay-pyqtgraph`, but there exists a number of additional plotters such as `mxdisplay-matplotlib`, `mxdisplay-webgl-classic` (using WebGL), `mxdisplay-webgl` (using WebGL and NodeJS), `mxdisplay-matlab` (using Matlab or Octave). This is the Matlab/Octave plotting tool.

## OPTIONS

- **INSTR**

  Displays the given mcstas 3D model with its defaults/current parameters.

- **name1=value1 ...**

  Displays the given mcstas model with given parameters.

- **-n N, –ncount N**

  Number of particles to simulate

- **\[-png\|-jpg\|-fig\|-eps\|-pdf\|-tif\]**

  Same as above, and specifies an output file format to generate. Possible save\_as are -png -pdf -fig -tif -jpg -eps

- **–inspect=COMP**

  Same as above, and only plot component names that match `COMP`, given as a single component word for partial match, such as Monitor a component interval such as Monok:Sample or 2:10 or 2:end

- **-m**

  Explicitely request to use Matlab

- **-o**

  Explicitely request to use Octave

## FILES

/usr/share/mcstas/tools/matlab /usr/share/mcstas/tools/Python/mccodelib/mccode\_config.json ~/.mcstas/mccode\_config.json http://www.mcstas.org

## EXAMPLES

- Display the *Test\_SX* example (Single crystal diffraction)

  - •

  `mcdisplay-matlab Test_SX.instr -n 1e2 TTH=13.4`

## AUTHORS

mcstas Team (mcstas.org)

## SEE ALSO

[mcstas(1)](/mcstas/1.md), [mcdoc(1)](/mcdoc/1.md), [mc(1)](/mc/1.md), [mcrun(1)](/mcrun/1.md), [mcgui(1)](/mcgui/1.md), [mcdisplay(1)](/mcdisplay/1.md)

## AUTHORS

MCSTAS neutron Ray Tracing Team.
