File Exchange

image thumbnail


version (106 KB) by Samuel Lazerson
MATLAB interface to aid in plotting of VMEC output.


Updated 11 Jul 2019

View License

A set of tools for examining the data produced by the VMEC toroidally confined plasma code. This suite contains a Graphical User (GUI) to aid in the plotting and examination of VMEC data stored in the 'wout' file. Updated to handle version 8.47. Also included is the VMECedit routine which will aid the user in creating VMEC input namelist files.
The VMEC code itself is maintained by Mark Cianciosa at Oak Ridge National Laboratory.

Cite As

Samuel Lazerson (2019). matlabVMEC (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

An issue has been identified for tokamaks (ntor=0). The code uses ntor*5 gridpoints in zeta to attempt to resolve the highest mode number. If ntor=0 then this causes problems. The fix is simple and will be included in the next release (sometime in the first quarter of 2011). If you have issues please email me and I'll send you an updated *.m file. Thanks to Peter Kavran for brining the problem to my attention.


Updated to latest changes.

Fixes bug when reading text WOUT files associated with new current density calculation and extrapolation near magnetic axis.

Bug addressed in how the xm and xn arrays were being handled for 8.47 text files (credit G. Weir).

Various bug-fixes and improvements. Issue with Nyquist arrays should now be fixed.

Updated to fix various bugs in current density plots, VMECedit updated, VMECcomp added.

Various improvements, including a substantial speedup for the cfunct and sfunct routines. VMECplot now loads equilibria in a couple seconds.

read_netcdf and read_fortran_namelist were not in the package in v2.1, they were added.

Added vector plotting capability. The speed for the transforms has also greatly been increased. Included routine for plotting vessel profile.

Latest version resolves issues with Tokamak (ntor=0) configurations, adds full support for netCDF, and includes routines for creating input namelists.

Removed unnecessary OSX hidden files from zip file.

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: read_netcdf, FORTRAN Namelist Suite

Inspired: matlabDIAGNO_VMEC, matlabEXTENDER