.m MATLAB file

Text & source code

MIME typetext/x-matlab
text/x-objcsrc
DescriptionMATLAB file
CategoryText & source code
Signature (magic bytes)66 75 6E 63 74 69 6F 6E (function)
Based ontext/plain

Frequently asked questions

What is a .m file?

The .m extension is used for several formats: MATLAB file (text/x-matlab) and Objective-C source code (text/x-objcsrc).

How do I open a .m file?

With any text editor – Notepad++, Visual Studio Code, or gedit and vim on Linux. The file contains readable text, possibly source code or configuration.

How can you tell a genuine .m file?

By the bytes at the start of the file, the signature (magic bytes): 66 75 6E 63 74 69 6F 6E (function). On Linux and macOS, file --mime-type example.m checks the real type regardless of the extension.

Which format is .m based on?

Technically a .m file is a subtype of “Plain text document” (text/plain), so programs for that base format can often read it too.

Which MIME type belongs to .m?

The MIME type is text/x-matlab. In the Apache web server: AddType text/x-matlab .m; in nginx: types { text/x-matlab m; }.

Nearby entries