Convert FIG to MATLAB code

Generate programmatic GUI MATLAB File from a FIG-File

You are now following this Submission

FIG2M - Generate programmatic GUI M-File from a FIG-File

Version : 1.0
Created : 10/05/2006
Modified: 14/04/2010
Author : Thomas Montagnon (The MathWorks France)

>> outputFile = fig2m(guiName,outputDir,syscolorfig,cb_gen);

guiName -> Name of the Fig-File (absolute or relative path)
outputDir -> Directory where the generated M-File will be saved
syscolorfig -> Use system default background color (true or false)
cb_gen -> Generate callbacks (true or false)
outputFile -> Name of the generated M-File

>> fig2m

If you call the function with no input arguments it will ask you for the parameters.

Cite As

Olivier (2026). Convert FIG to MATLAB code (https://in.mathworks.com/matlabcentral/fileexchange/14340-convert-fig-to-matlab-code), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: Graphical Points Selection, img2curve

Categories

Find more on Printing and Saving in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0.0

- Change the function name from generate_m_file to fig2m
- Bug corrected for generation of String property value containing new line and ' characters.
- Add support for uitoolbar, uipushtool and uitoggletool
- Add support for uitable controls

1.0.0.0

- Add Support for UserData property
- Bug correction in String property value generation