207 votes
M File - What is an .m file and how do I open it?
Learn about .M files and view a list of programs that open them.
Languages
Overview
What is an M file? An M file is a class implementation file used by programs written in Objective-C. It begins with the @implementation directive and initializes variables and functions that can be referenced by other Objective-C source files. M files may also reference header ( .H ) files.
More Information Objective-C is most commonly used to implement applications for Apple's Mac OS X and iOS operating systems. Apple's Cocoa API provides the Objective-C programming interface for Mac OS X, and the iOS API provides the programming interface for the iOS platform.
Apple Xcode 5 Icon
Breadcrumbs
Previous / Next
In-Depth
.M File Extension
5 file types use the .m file extension.
Objective-C Implementation File
| Developer | Apple |
| Popularity |
3.6 | 207 Votes |
What is an M file?
An M file is a class implementation file used by programs written in Objective-C. It begins with the @implementation directive and initializes variables and functions that can be referenced by other Objective-C source files. M files may also reference header ( .H ) files.
More Information
Objective-C is most commonly used to implement applications for Apple's Mac OS X and iOS operating systems. Apple's Cocoa API provides the Objective-C programming interface for Mac OS X, and the iOS API provides the programming interface for the iOS platform.
Open over 400 file formats with File Viewer Plus . Free Download
Programs that open M files
Sort
Pricing
Program Name
Platform
Reset
X
Windows
Richardson EditRocket
Free Trial
jEdit
Free
gVim
Free
Mac
Apple Xcode
Free
Bare Bones BBEdit
Free Trial
MacroMates TextMate
Free
Richardson EditRocket
Free Trial
jEdit
Free
MacVim
Free
GNU Compiler Collection (GCC)
Free
Linux
Richardson EditRocket
Free Trial
jEdit
Free
Vim
Free
GNU Compiler Collection (GCC)
Free
Apple complier (cc)
Stepstone compiler (objcc)
Category: Developer Files
Updated: August 24, 2016
MATLAB Source Code File
| Developer | The MathWorks |
| Popularity |
3.4 | 83 Votes |
An M file may also be a source code file used by The MathWorks MATLAB, an advanced application for analyzing data and performing mathematical computations. It may store a script , class , or an individual function in the MATLAB programming language that MATLAB users create to execute algorithms, plot graphs, and perform other mathematical operations. Since M files store plain text, you can use any text editor to open and edit them, although most users open them with MATLAB.
More Information
M file open in The MathWorks MATLAB R2023a
MATLAB provides many features to analyze data, develop algorithms, create models, build apps, and more. One of its primary features is its high-level programming language, which scientists and engineers often use for various purposes, such as running simple data query commands or developing large-scale applications for collecting and visualizing data.
How to create an M file with MATLAB
To create an M file with MATLAB:
How to open an M file
You can open an M file with The MathWorks MATLAB (multiplatform). To open an M file, select Open from the "HOME" or "EDITOR" tabs, choose the M file, then select Open .
Opening an M file with a text or source code editor
M file open in Apple Text Edit
Since M files store plain text, you can open them with a text editor, such as Microsoft Notepad (Windows) or Apple TextEdit (Mac), or a source code editor. However, most users open and edit M files with MATLAB since the app provides helpful editing tools not available with third-party apps.
Programs that open M files
Sort
Pricing
Program Name
Platform
Reset
X
Windows
The MathWorks MATLAB
Free Trial
Any text editor
Mac
The MathWorks MATLAB
Free Trial
Any text editor
Linux
The MathWorks MATLAB
Free Trial
Any text editor
Category: Developer Files
Updated: May 4, 2023
PC-98 Game Music File
| Developer | N/A |
| Popularity |
3.3 | 23 Votes |
Sound file format used by Japanese PC-98 computers and emulators ; contains synthesizer music that can be used as instruments to create songs; referenced in order to know what music to play.
More Information
NOTE: In order to play M files with FMPMD2000, you need to download the WinFMP.dll and PMDWin.dll files, which are available from the same location.
Programs that open or reference M files
Sort
Pricing
Program Name
Platform
Reset
X
Windows
FMPMD2000
Free
Category: Audio Files
Updated: May 20, 2014
Mercury Source Code File
| Developer | The Mercury Project |
| Popularity |
3.3 | 25 Votes |
Source code file written using Mercury, a functional programming language that was developed at the University of Melbourne, Australia; saved using plain text formatting and uses syntax similar to Prolog.
More Information
Mercury was written in order to provide a robust language for large real world applications. It includes several error-checking features not provided by other logic programming languages. For example, the language incorporates static analysis that can catch type checking errors before runtime. This enables greater assurance over the correctness of the program and also allows the compiler to generate more efficient code. However, the developer must specify each of the "type," "mode," and "determinism" constructs while programming, which is not necessarily required by other languages.
NOTE: The developmental version of the Mercury compiler is currently distributed in a source code format and does not include compiler binaries. However, a Windows port of Mercury, called winmercury, includes binaries. It also includes Vim syntax highlighting files for source code editing.
Programs that open or reference M files
Sort
Pricing
Program Name
Platform
Reset
X
Windows
winmercury
Free
gVim
Free
Microsoft Notepad
Included with OS
Other text editor
Linux
Mercury Compiler
Free
GNU Emacs
Free
Beaver
Free
Vim
Free
Other text editor
Category: Developer Files
Updated: July 19, 2011
Wolfram Mathematica Language Package
| Developer | Wolfram Research |
| Popularity |
3.1 | 25 Votes |
An M file contains functions or other inputs used by Wolfram Research Mathematica, a technical computing system. These inputs consist of plain text written in the Wolfram Language, a proprietary programming language. Mathematica includes several default M files, and users can create their own, custom M files.
More Information
M file open in Microsoft Visual Studio Code
Using Mathematica, researchers, data analysts, and others can perform several types of mathematical and scientific computations. Typically, Mathematica users work within Mathematica Notebook ( .NB ) files, to create data analysis visualizations and other outputs.
To perform operations, Mathematica uses Wolfram Language functions and other inputs. These inputs are often stored in M files. Mathematica automatically loads some default M files at startup, to allow users to use the inputs those files contain.
Optionally, users can load other M files included with Mathematica, to use the inputs those files contain. Or, users can create their own M files, using Mathematica or the Wolfram Workbench IDE, and then load those files in Mathematica.
Common M Filenames
init.m - Initialization files that contain settings Mathematica loads at startup.
How to open an M file
If you want to view or edit an M file's contents, you can open it with any text editor. However, you're best off viewing and editing M files with Wolfram Workbench, an Eclipse-based IDE meant to be used alongside Mathematica.
To use an M file with Wolfram Mathematica :
Mathematica will then import the inputs your M file contains into your current NB file. In some cases, you will have to evaluate these inputs manually. In others, Mathematica will automatically ask you whether you want to evaluate the inputs.
You can find more information about how to use M files with Mathematica here .
How to export an M file from an NB file
In some cases, you may want to save Wolfram Language packages that you've created within an NB file as their own, separate M file. To do this manually:
Instead of overwriting your NB file, Mathematica will create a new M file that includes the contents of all the cells you marked as Initialization cells. (This file will also include your NB file's other contents, but those contents will be commented out.)
If you want to automatically save all Wolfram Language packages you create within NB files as separate M files, you can do so by adjusting Mathematica's settings as follows:
From now on, when you save an NB file that contains Initialization cells, Mathematica will also save an M file that includes the contents of the NB file's Initialization cells (and the NB file's other contents, commented out).
Programs that open M files
Sort
Pricing
Program Name
Platform
Reset
X
Windows
Wolfram Research Mathematica
Free Trial
Wolfram Workbench
Free
Any text editor
Mac
Wolfram Research Mathematica
Free Trial
Wolfram Workbench
Free
Any text editor
Linux
Wolfram Research Mathematica
Free Trial
Wolfram Workbench
Free
Any text editor
Category: Data Files
Updated: October 25, 2023